News for hackers. Stuff that matters.
Re:Reflection for C++26 by petters on Tuesday July 02, 2024 @02:43AM (#40854102)
Serialisation often needs additional information not present in the struct definition: for enabling backwards-compatibility and default values.

Same for command line parameters. We want documentation strings, maybe dashes in the name etc.

But that can surely be solved with a little more advanced struct

Re:Reflection for C++26 by einpoklum on Tuesday July 02, 2024 @03:21AM (#40854291)
I have one word for you: attributes (which the compiler, and the reflector, know about).
Re:Reflection for C++26 by petters on Wednesday July 03, 2024 @02:20AM (#40863257)
Yes you’re right. That has worked well enough in other languages