Locknote: Local Reasoning in C++
summary
Argues that local reasoning—proving a function or class correct from its API alone—scales software reliability by enforcing precise preconditions, value-semantics copies, and explicit projection rules; shows C++ pitfalls like passing shared_ptrs instead of references, aliasing bugs in increment/erase examples, and lifetime/self-initialization surprises; explores Hyo-inspired argument qualifiers, the law of exclusivity for mutation, and projection invalidation rules; demonstrates chaotic failure with a chessboard and the three‑body problem and proposes monotonic/CRDT patterns (plus a coat‑check numbering trick) as coordination‑free solutions.
AI-written summary · about
chapters (10)
- 0:00Introduction and context
- 5:23Why software projects fail
- 9:30Fundamentals of local reasoning
- 13:54Managing function arguments
- 21:09The law of exclusivity
- 29:07Projections and validity
- 35:18Designing robust objects
- 45:20Extrinsic relationships
- 54:46Complexity and chaos
- 57:32Structural strategies
related talks
01h 34mKeynote: Contracts, Testing & the Pursuit of Well Defined Behaviour
58mA Practical Guide to Loose Coupling
01h 31mLearning from C++ Juniors’ Mistakes
52mNobody Can Program Correctly - Lessons From 20 Years of Debugging C++ Code
05mLT: Proof Driven Development
01h 01mBack to Basics: Debugging in Cpp
01h 12mWriting robust code
37mContracts For Getting More Programs Less Wrong
