Functional Programming in C++ (Run time vs Compile time types)
summary
Claims that C++14 can move protocol shape into the compiler by using value‑templated enums and constexpr functions to produce compile‑time byte arrays and static_asserts so headers and payload sizes are embedded with no runtime branching; it serializes types into arrays that appear directly in assembly, shows runtime parsing via parser combinators over std::span and std::optional/monostate, boxes results into std::variant for runtime dispatch, cites a 33 vs 259 lines of assembly comparison and demonstrates working, compiling code.
AI-written summary · about
chapters (7)
- 0:00Functional programming in C++
- 4:28Enums and limitations
- 8:28Compile-time polymorphism
- 14:12Runtime parsing with variants
- 20:14Performance comparison
- 21:42Compile vs runtime trade-offs
- 22:05Summary & Q&A
related talks
55mHow bad is meta-programming still today?
01h 09mFunctional Programming in C++
01h 02mEmbedded Friendly C++: Features That Make a Difference
59mFunctional Programming: data
01h 39mKeynote - C++ Metaprogramming: evolution and future direction
01h 01mUsing Modern C++ to Eliminate Virtual Functions
01h 36mPlenary: Cooperative C++ Evolution - Toward a Typescript for C++
54mCompile-Time Validation in C++ Programming
