Hacker News new | ask | show | jobs
by pjmlp 957 days ago
Apparently someone showed up to pick up the work regarding reflection.

However at least we already have a kind of poor man's reflection, with constexpr if + concepts + type traits.

As for the rest, I am also not a big fan, but until my favourite language runtimes and GPGPU tools switch to something else, C++ is part of the toolbox. No need to add even more layers.

2 comments

Reflection will be a welcome addition whenever it arrives. On the other hand, whatever is standardize will be a profound disappointment compared to Circle C++.
Circle... I hope he can do it. Sounds too good to be true everyone I read about it.
Yeah, Circle is the only "Typescript for C++" alternative.
boost::pfr is also huge for reflection in C++. It leverages corner cases of the language and compilers but does so uniformly (works for MSVC, GCC, clang which is all that matters in 2023).

It allowed me to write for instance https://GitHub.com/celtera/avendish which keeps on giving. The last version even add automatic field name reflection which is huge: https://www.boost.org/doc/libs/master/doc/html/boost_pfr/tut...

Wow, how does this even work? Can you share some hints?
Thanks for the hint, wasn't aware of it.