Functional Programming in C++
summary
Argues that C++ already supports practical functional programming and shows concrete tools and outcomes: C++14 generic lambdas and template inlining keep higher‑order functions zero‑overhead, Boost.Hana curry/overload/fix supplies compositors (curry, overload, fixpoint for recursive lambdas), and range‑v3 lazy views let chained transforms avoid intermediate allocations so composition stays fast. Notes std::function adds runtime indirection, persistent data structures and algebraic types (optional/variant/expected) improve safety, and examples compile and perform acceptably on real code.
AI-written summary · about
chapters (12)
- 0:00Functional programming in C++
- 2:31OOP in modern C++
- 6:27Core functional principles
- 10:45Higher-order functions & lambdas
- 18:19Function composition C++14
- 22:39Boost Hana & combinators
- 38:43Avoiding mutable state
- 48:07Pure functions & composability
- 51:20Laziness & performance in ranges
- 59:56Functional data structures & concurrency
- 1:00:38ADTs & error handling
- 1:07:32Lawful abstractions & monads
related talks
58mThe Imperatives Must Go! [Functional Programming in Modern C++]
50mThinking Functionally in C++
23mFunctional Programming in C++ (Run time vs Compile time types)
59mFunctional Programming: data
01h 04mFunctional C++ for Fun and Profit
55mHow bad is meta-programming still today?
31mFunctional programming guerilla in the land of Rust
50mFunctional reactive programming in C++
