Declarative thinking, declarative practice
summary
Compares imperative vs declarative with concrete C++ rewrites using ranges, transforms, iterators and lazy evaluation to produce first hundred squares, parses 12‑hour time strings, solves Roman numerals with a unary trick, and models immutable/persistent stacks that share representation but encounter a real failure when naive destruction recurses and recursive destructor overflows ~5000; prototypes a declarative test style (Heathrow) that leads to Heathrow prototype → Catch; shows which language features help, which memory/threading problems remain, and what actually changes the cognitive load.
AI-written summary · about
chapters (27)
- 0:00Intro
- 3:28Quest for meaning
- 8:18Example
- 10:00Writing bad code
- 15:02For loop
- 19:58Intentional
- 22:53Lazy evaluation
- 26:49The essence of programming
- 29:18Coded decimal
- 36:23Shared state
- 43:21Mutability
- 43:31Date class
- 48:44Change state
- 49:21Naming
- 50:26Containers
- 50:56Objects
- 51:30Lab Rat
- 51:48Default construction
- 52:10System of meaning
- 52:24Contract metaphor
- 52:48Prepost conditions
- 55:37Red and White Book
- 55:59Stack
- 56:22Stack conversations
- 58:34Exceptions and failures
- 59:21Mapping
- 59:31Immutable








