Thinking Functionally in C++
Talkat CppCon 2023 · on Monday, 2023-10-02· at 15:15· Maple 3/4/5, 6700 North Gaylord Rockies Boulevard·
summary
Argues for classifying code as actions, calculations and data and shows concrete C++ patterns that realize that — using ranges and views, lambdas, copy_if/transform/accumulate/reduce and call_once to turn temporaries into lazy pipelines, reduce allocations and make calculations thread‑safer. Demonstrates wrapping a C oven API with a lambda that captures a handle to give RAII via lambdas, composes filters/maps/reduces for the banana processor and birthday-card example, and emphasizes lazy evaluation and when copying versus mutating matters.
AI-written summary · about
chapters (14)
- 0:00Intro
- 0:36Expectations
- 2:07Programming Paradigms
- 4:33Identifying Code functionally
- 9:11Variables
- 12:01Example
- 15:20Implementation
- 18:11Functions as Data
- 20:46Bakery Automation
- 21:20Existing API
- 23:07Lambdas
- 27:16Functions
- 33:55Lazy Evaluation
- 41:50Elephant in the Room
related talks
01h 09mFunctional Programming in C++
01h 04mFunctional C++ for Fun and Profit
01h 30mC++ in Constrained Environments
01h 05mC++11 in the Wild: Techniques from a Real Codebase
55mMonadic Operations in C++23
01h 10mThe Three Little Dots and the Big Bad Lambdas
01h 30m50 shades of C++
01h 03mWriting sustainable software. The how and the what!
