Functional Programming in C++: A Modern Approach
300 pages
English
PDF
4.5

Functional Programming in C++: A Modern Approach

Functional Programming in C++: A Modern Approach

Author:

Year:

Summary:

The book "Functional Programming in C++" is a practical guide for developers who want to master the functional style in the C++ language. Unlike traditional imperative approaches, functional programming allows you to write more predictable, modular, and easily testable code. The author, Alexey Voronov, consistently reveals concepts, starting from the basics and ending with advanced techniques.



What is this book about?

The publication covers key aspects of functional programming in the context of C++:

  • Lambda expressions and closures — how to effectively use anonymous functions to create compact code.
  • Higher-order functions — map, filter, reduce and their implementation using STL (std::transform, std::copy_if, std::accumulate).
  • Data immutability — working with const, copying and moving objects to prevent side effects.
  • Function composition — creating call chains and data processing pipelines.
  • Design patterns — monads, functors, currying, and partial application.
  • Parallelism and concurrency — using the functional approach for safe multithreading.


Who is this book for?

The book will be useful for:

  • C++ developers who want to expand their toolkit and write more elegant code.
  • Programmers familiar with functional languages (Haskell, Scala) who want to apply these principles in C++.
  • Students and teachers studying modern programming paradigms.
  • Engineers working with high-load systems where performance and reliability are important.


What will you learn?

After reading, you will be able to:

  • Write clean and self-documenting code without side effects.
  • Effectively use the standard library (STL) for data processing.
  • Apply recursion and tail recursion in C++.
  • Manage program state without mutations.
  • Integrate functional idioms into existing projects.


The book contains many code examples, practical exercises, and real-world usage scenarios. All examples are tested on C++17 and C++20 standards. This is not just theory — it is a ready-made tool for everyday work.



Start writing C++ like a professional — with a functional approach!

Recommendations