Keynote: Reflection Is Only Half the Story
summary
C++26 reflection solves observation but not generation, so the talk argues for tooling that generates formatters, serializers and tuple_cat code from reflections instead of handwriting templates or fragile C macros. It demos a working prototype that uses an annotation callback when a type is complete and a push-based model to inject an explicit formatter into an open namespace, compares Rust/Swift macro styles, and favors producing syntax via token-sequence output while keeping macro inputs as compiled C++ reflection objects to allow no raw code and preserve full language semantics.
AI-written summary · about
chapters (10)
- 0:00C++ 26 reflection features
- 10:54C macros vs templates limits
- 21:25Reflection vs template metaprogramming
- 31:06Swift and Rust macro systems
- 42:58Token sequences for code gen
- 54:08Push-based formatting with reflection
- 1:08:12Swift and Rust expression macros
- 1:18:17Designing C++ macros future
- 1:24:55Reflection half the story
- 1:33:18Q&A
related talks
01h 01mReflection
01h 10mReflection Is Good for C++ Code Health
01h 11mKeynote: C++ Horizons
01h 08mReflections: Compile-time Introspection of Source Code
36mCompile-time reflection, Serialization and ORM
46mBuilding a C++ Reflection System in One Weekend Using Clang and LLVM
47mReflection Techniques in C++
42mEternal Sunshine of the Spotless Macro
