top | item 46750814

(no title)

mcdeltat | 1 month ago

I've been an avid C++ user for ages and this is the first time I've seen the final spec of C++26 reflections used in a practical context - and wow am I having a "wtf" moment at the syntax.

^^T ?? obj.[:member:] ?? What is this craziness? No way this is the best we could come up with. I'm actually thinking C++ may be going too far (and this is as someone who thinks template metaprogramming is "fine").

Never before has that quote "inside C++ is a smaller, better language trying to get out" been more applicable.

discuss

order

pjmlp|1 month ago

While I agree it has a certain Perl feeling and I used to advocate for functions/operators, e.g. reflex or similar, it still feels better than unicode operators in FP languages or the two macro systems used by Rust.

At least being based on compile time execution infrastructure means you can debug it on IDEs, Clion already has some work into that direction.

https://blog.jetbrains.com/clion/2025/09/introducing-constex...

psyclobe|1 month ago

Eh, the raw capability of this feature will I think prove its use