C++, Abstract Algebra and Practical Applications
summary
Claim: represent abstract algebraic structures in C++ types so illegal operations fail at compile time and correct invariants need no repeated runtime checks. Implementation uses type traits, static_asserts, constexpr constructors and the CRTP generated operators to make a length type model an additive monoid (equality, +, ordering). Literal and compile-time values validate with zero runtime cost; runtime-created instances validate once (constructor throws on invalid state). Result is earlier error detection, far less debug churn and measurable maintenance savings.
AI-written summary · about
chapters (13)
- 0:00Introduction and context
- 2:54Defining program correctness
- 5:11Formal models and reality
- 6:59Numerical analysis and bugs
- 10:36Hoare logic for correctness
- 15:51Logical abstraction in C++
- 18:15Verifying function constraints
- 22:30Design by contract in C++
- 25:55Leveraging the C++ type system
- 32:00Abstract algebra foundations
- 40:07Error handling and type traits
- 47:27Metaprogramming for correctness
- 51:05Practical benefits and Q&A
related talks
54mC++ Concepts for Developers
01h 10mBack to Basics: Algebraic Data Types
58mExploration of C++20 Meta Programming
01h 30mRethinking the Way We Do Templates in C++
30mConstraint Typing with Boolean Algebra
01h 34mMetaprogramming in C++14
01h 01mEasy to Use, Hard to Misuse: Declarative Style in C++
01h 39m“Thoughts on a more powerful and simpler C++ (5 of N)”
