Taking Static Type-Safety to the Next Level - Physical Units for Matrices
summary
A concrete library called typesafe Matrix embeds distinct physical units and coordinate‑frame tags into Eigen-backed vectors and matrices, inferring element units by row/column exponents so Jacobians, covariances and point/delta vectors compose correctly. C++ template checks and optional C++20 concepts produce static assertions for out-of-bounds, unit or index mismatches, dangling-expression and aliasing cases, so many bugs surface at compile time. The implementation is practical and used in automated‑driving code and available on GitHub.
AI-written summary · about
chapters (12)
- 0:00Introduction and goals
- 2:32Concepts and terminology
- 5:10Combining units and matrices
- 11:08Design requirements
- 16:03Implementation techniques
- 21:16Construction and validation
- 29:25Taxonomy of matrix operations
- 34:23Advanced safety checks
- 38:13Validation of complex operations
- 45:18Big picture and big-picture view
- 52:00Preventing common C++ bugs
- 56:29Conclusion and Q&A
related talks
46mType safe C++? LOL!
25mWhy static types in Javascript? — Preethi Kasireddy
42mIf I unit test do I really need static typing
23mHow Type-Driven Development Can Turbocharge your Contract's Security
34mTypes Are Not Safe
28mPractical Confidence: Using Types to Help Your Computer Help You
01h 11mC++20 Templates: The next level: Concepts and more
22mType-safety is eating the world
