Monads in Modern C++
summary
Engineering team proves monadic patterns cut boilerplate by building a C++ POC that treats pointers, find results, std::vector and std::optional monadic ops as a unified "maybe" adapter; key operations are transform + join = bind (aka and_then/flat_map) and a pipe-based API that compiles on C++17/20. Examples include doubling numeric strings, parsing with error propagation, a toy compiler (file → vector of errors) and a chess-state simulator; std::future adapter exists but async execution and schedulers remain unresolved.
AI-written summary · about
chapters (40)
- 0:00Introduction
- 5:58What makes C
- 9:25What is a functor
- 16:23Is this the first time we have seen a functor
- 16:58Can we go beyond that
- 17:11Optional
- 18:06Functor
- 18:45F function
- 19:26Conditional checks
- 20:08Why should I care
- 23:22What went wrong
- 25:05Join
- 26:03Joining
- 26:24Helper function
- 27:13Formal Definition
- 28:00Vector Monad
- 29:41Vector of Files
- 30:05Range Join
- 30:47Filtering
- 31:13Simulations
- 32:34Evolve Boards
- 33:22Cartesian Products
- 35:36Other Monads
- 39:18Style Optional
- 40:25Option
- 40:46Expected
- 41:06Parsing
- 42:02TL Expected
- 42:58Ranges
- 43:45Future
- 44:29Asynchronous
- 44:58Two fundamental issues
- 45:19A continuation
- 46:12B continuation
- 46:48Possible fixes
- 47:30Stud Execution Framework
- 48:32CPlusMoradic Interface
- 50:02Walkthrough
- 58:25Type aliases
- 59:03Business logic
related talks
01h 18mSafe and Readable C++ Code: Monadic Operations in C++23
29m“Functional programming: functors and monads"
58mMonoids, Monads, and Applicative Functors: Repeated Software Patterns
01h 10mSafe and Readable Code - Monadic Operations in C++23
01h 26mMonadic Operations for Box-Like Types - Designing the Extensibility Model
01h 16mFunctional Composition Beyond Monads
01h 47mFunctional C++
01h 07mDesign Patterns in Modern C++
