Evolving a Translation System with Reflection in C++
A nice example of C++26 reflection moving from theory into something practical.
Evolving a Translation System with Reflection in C++
By GitHub user: friedkeenan
From the post:
Lately, I’ve been using C++26 reflection to create some crazy and cursed stuff. But even though I quite enjoy that work, it is as well quite far from the norm of what reflection is going to offer us in our everyday code.
Reflection is definitely not just that craziness, and so I want to present reflection in a more grounded environment, and in a way that will probably land as more typical usage as our codebases gradually come into contact with it.
So then, in this blogpost, I will be exploring a spectrum of options for how reflection can upgrade a translation system that I already use in one of my projects. We’ll look at where it’s at now without reflection, identify places in which reflection could plausibly help, and then explore a series of modifications we could make to soothe those problem points.
The purpose of looking at each of these options will not be to declare that one is clearly the best option or the one that makes the most sense, but rather to get a better feel for what could make sense to do, and whether some things are really worth the effort. We’re trying to gauge the benefits that reflection can bring to our code.
And who knows, even if one option is less appealing for this particular situation, maybe in a different situation it could be the perfect fit.


Ever wondered why your clean, object-oriented design sometimes slows things down? This piece breaks down how virtual dispatch impacts performance—and how techniques like devirtualization and static polymorphism can eliminate that overhead entirely.
In algorithmic trading, the Python-vs-C++ debate is usually framed as flexibility versus speed — rapid strategy development on one side, ultra-low-latency execution on the other. But with C++26 reflection, that trade-off starts to disappear, making it possible to generate Python bindings automatically while keeping the core logic running at native C++ performance.