How the Environment Changes the Way We Write C++ Code
summary
Argues that “good code” depends on constraints: when heap allocations are forbidden the code uses a fixed-size container (example: static_vector sized for 100 objects) plus std::variant to store mixed types, eliminating runtime new/delete. Shows how multi-level CRTP replaces virtual dispatch and how C++23’s implicit this simplifies it. Demonstrates deterministic recomputability by record component inputs (number every sensor sample, store RNG seeds) so rare bugs that occur once per month can be replayed exactly.
AI-written summary · about
chapters (19)
- 0:00Introduction
- 0:30Adaptation to the environment
- 2:18Overview
- 3:27Enlightenment
- 5:23Boundary Conditions
- 9:38Latency
- 11:38Low latent CC
- 12:14deterministic recomputability
- 15:34hypothetical runtime behavior
- 22:19programming without dynamic allocation
- 24:22programming without dynamic memory
- 29:59recurring template pattern
- 32:03multilevel crtp
- 34:40base class
- 35:22input methods
- 38:21another example
- 39:52passkey idiom
- 41:56C23 implementation
- 43:59Classical functor
related talks
01h 11mC++ in the World of Embedded Systems
01h 08mKeynote: What can C++ do for embedded systems developers?
52mC++ for Embedded Development
01h 00mModern Software Needs Embedded Modern C++ Programming
01h 09m“Modern C++ in Embedded Systems - The Saga Continues”
39mRobotics at Compile Time: Optimizing Robotics Algorithms With C++'s Compile-Time Features
01mC++ On Sea 2024 Preview: How to keep your binaries small?
01h 18mWriting better embedded Software
