← Home ← Back to /g/

Thread 106303483

18 posts 8 images /g/
Anonymous No.106303483 >>106303578 >>106303699 >>106303924 >>106303985 >>106305107 >>106305126
Are You Guys Excited For Reflection In C++?
Is it true guys? Is C++ finally going to get reflection? Are you guys excited for it just as much as these C++ experts?
Anonymous No.106303525 >>106308092
>being excited for any developments in the exploit riddled, memory unsafe language
Rust won btw
Anonymous No.106303546 >>106303568
Gee I can't wait to use this in 2035 when compilers finally implement it
Anonymous No.106303568
>>106303546
2055 for industry to adopt it...
Anonymous No.106303578
>>106303483 (OP)
What C++ needs is to include functionality for parsing and analyzing C++ code in the standard library.
Then you can just write a metaprogram that operates on your source code and generates the code you want.
Anonymous No.106303646
I think this is a trap like lots of other C++ features. I tried reflection in Rust, and it always overcomplicated shit compared to just using a mutable object type and serializing/deserializing it to/from a regular non reflected struct.
Anonymous No.106303699
>>106303483 (OP)
ready for 3 times the size of the executable.
Anonymous No.106303924 >>106303985
>>106303483 (OP)
I bet its crippled and almost useless. Which is pretty much the standard for every new c++ feature. They make sure to take what could be a game changing feature, and reduce it down to the absolute minimal amount of functionality. Ensuring massive additional complexity for minimal utility.
Anonymous No.106303985
>>106303483 (OP)
You could already do this on nearly every modern platform by dlopening yourself.

It's almost always useless.
>>106303924
It's crazy how every C++ feature sounds so exciting and then has half a dozen exceptions that make it completely useless in practice. You might as well just use C.
Anonymous No.106305107 >>106305275 >>106307573
>>106303483 (OP)
>annotations are [[=Annotation]] and not @Annotation (https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3394r0.html)
kys bjarne
Anonymous No.106305126
>>106303483 (OP)
Think how amazing C++ will be when you're long dead.
Anonymous No.106305275 >>106307584
>>106305107
Backwards compatibility, baby.
https://github.com/rust-lang/rust/issues/127343#issuecomment-2295313993
https://github.com/rust-lang/rust/issues/127343#issuecomment-2218261296
Anonymous No.106307573
>>106305107
Usecase?
Anonymous No.106307584
>>106305275
>Version pinning is so good I love not having to update my code when a new version drops.
Version pinning:
>Those repos that have an old version of time in a lockfile will need to update that.
Anonymous No.106307630 >>106307697 >>106307718
what is reflection? eili5
Anonymous No.106307697
>>106307630
The code examining itself.
Anonymous No.106307718
>>106307630
Autogenerated type metadata
Anonymous No.106308092
>>106303525
>Rust won btw

<--- yeah, Rust won

kek