Design Idioms from an Alternate Universe
summary
Argues that concrete C++ examples beat jargon: model states with std::variant state machine to eliminate invalid combinations, use std::optional::transform (C++23) and manual lifting to turn state functions into optional-aware ones, compose async and sync flows via coroutines to get monad-like behavior, and use lenses for nested updates to read and update deep fields. Mentions microbenchmarked move/ref strategies and practical examples (building → apartments → tenants → payments) showing the ideas are implementable and performant.
AI-written summary · about
chapters (19)
- 0:00Intro
- 0:15About me
- 0:49What is software design
- 2:35unix ideology
- 3:05composition
- 3:40functional programming
- 4:56vid property
- 6:28composition over inheritance
- 11:59conclusion
- 16:09transform function
- 18:05lifting
- 22:02lenses
- 35:10functions in C
- 36:55optionals in C
- 40:12compose
- 43:03range
- 43:55draw
- 48:00summary
- 52:11live question
related talks
01h 05mThe Imperatives Must Go!
26mInfinite Possibilities
59mBuilding an Intuition for Composition
57mDesign Patterns - The Most Common Misconceptions (2 of N)
05mChoosing an Abstraction
25mMaking Impossible States Impossible
32mThere and Back Again: Grokking State and Data
24mPanel discussion about state management
