Reflection for C++26
isocpp.org
Reflection for C++26
1–10 of 214 posts
Re: Reflection for C++26
#2Re: Reflection for C++26
#3Re: Reflection for C++26
#4Compile time or runtime? Compile time reflection would be completely painless and bloat-free.
Re: Reflection for C++26
#5Compile time or runtime? Compile time reflection would be completely painless and bloat-free.
I suppose C++'s template system might be able to generate JSON deserializers with static reflection as well
Re: Reflection for C++26
#6Re: Reflection for C++26
#7Re: Reflection for C++26
#8Compile time or runtime? Compile time reflection would be completely painless and bloat-free.
RTTI is a super vital feature for deserializing without having to generate code or write a ton of tedious boilerplate. I'd be very happy with RTTI in C++ and my life would be instantly easier if there were RTTI in typescript so I didn't have to use any of the hacky solutions out there for deserializing JSON on backends without RTTI. I suppose C++'s template system might be able to generate JSON deserializers with sta…
Re: Reflection for C++26
#9FYI: this is the latest draft of the proposal and it has not been voted into C++26 yet, but it is getting close.
Looks like it did very well in St. Louis!
Re: Reflection for C++26
#10Earlier quoted context omitted.
RTTI is a super vital feature for deserializing without having to generate code or write a ton of tedious boilerplate. I'd be very happy with RTTI in C++ and my life would be instantly easier if there were RTTI in typescript so I didn't have to use any of the hacky solutions out there for deserializing JSON on backends without RTTI. I suppose C++'s template system might be able to generate JSON deserializers with sta…
You don't need RTTI to deserialize data in a clean way. What you need is return-type polymorphism. Haskell has this and it makes writing serializers and deserializers symmetric and totally painless.
Swift got into this mess early in it's lifecycle and it's type checking is still more expensive than the rest of the compiler combined, and unpredictable on top of that.