Simplify and Secure Equation Systems with Type-Driven Development
summary
A C++ library uses template metaprogramming, constexpr and tuple algorithms to compute indices from domain types so array-index bugs become impossible at compile time; it exposes composable expressions (quantity, add, derivative) with an evaluate(span) API and propagates physical units via the units library so mismatched arithmetic fails to compile. The codebase is a few hundred lines, supports compile-time index mapping, units-checked quantities, and combining reusable subsystem types into a single evaluated system.
AI-written summary · about
chapters (8)
- 0:00The problem of buggy code
- 2:37Defining project goals
- 7:54Strong types and indexing
- 14:11Building expression trees
- 20:53Automating derivative systems
- 29:02Securing with physical units
- 35:18Refining system abstraction
- 43:42System composition and conclusion
related talks
01h 05mA C++ Approach to Physical Units
41m“Avoiding Disasters with Strongly Typed C++”
30mExpression Templates for Efficient, Generic Finance Code
01h 01mRethinking the Way We Do Templates in C++
55m“Using Types Effectively"
01h 09m“Boost Units Library for Correct Code"
01h 31mImproving Our Safety With a Modern C++ Quantities and Units Library
01h 02mA Physical Units Library For C++
