“The Power of Reflection with Facebook's Thrift"
summary
Facebook adds static reflection in Thrift and shows concrete tooling: generated metadata headers (structs, enums, unions), a JSON pretty printer and a binary serializer built from compile‑time type lists, try_find compile-time trie and sort/search meta algorithms, variant descriptors, container traits and compile‑time strings. Enabling requires the fatal flag to thrift (generated gen files to include). The demos include map<string,string> → typed struct migration and a reimplemented serializer that reports measurable build‑time improvements and smaller binaries. Requirements: meta‑programming experience.
AI-written summary · about
chapters (6)
- 0:00Introduction and goals
- 1:46JSON printer example
- 22:30Serializer implementation
- 33:53Untyped data translation
- 42:12Enabling reflection support
- 49:35Closing remarks and future work
related talks
29mOptimizing compilation times with Templates
01h 01mReflection
01h 37mReflection: Compile-Time Introspection of C++
47mReflection Techniques in C++
01h 10mReflection Is Good for C++ Code Health
36mCompile-time reflection, Serialization and ORM
05mLightning Talk: Static Reflection on the Budget in C++23
46mBuilding a C++ Reflection System in One Weekend Using Clang and LLVM
