logoalt Hacker News

logicchainstoday at 10:05 AM3 repliesview on HN

>C++26 is also a joke imho.

C++26 will allow billions of lines of pointless serialization boilerplate to finally be deleted, adding the basic reflection functionality that most other languages have had for decades.


Replies

jstimpfletoday at 10:35 AM

Reflection is a joke. De/serializing arbitrary C++ structs is ill-defined. When you need serialization, even lots of it (e.g. silly JSON), I think you're better off writing your own framework where you can be clear about data formats and transformation rules.

show 1 reply
gignicotoday at 10:08 AM

Yes, C++26 reflection is nice, but also extremely complex to understand and use well. The rest of C++26 is the usual series of too-little-too-late additions. Meanwhile I’m still waiting for pattern matching to become a thing (a proposal has been discussed for ages)

tonyedgecombetoday at 10:58 AM

I can't think of a time where using reflection for serialisation hasn't come back to bite me.