Anonymous
8/14/2025, 12:38:53 AM
No.106252504
>>106252522
>>106252609
>>106252822
>>106253361
>>106253401
>>106253730
>>106254648
>>106254657
>>106254672
>>106254678
>>106255134
>>106255144
>>106255270
>>106255299
>>106255383
>>106255599
>>106255960
>>106256648
>>106257603
>>106257695
>>106260011
>>106260778
>>106260875
>>106261105
>>106270760
>>106270927
>be c++ committee
>propose reflection for c++26
>add annotations for reflection so you can attach metadata to symbols
>need a new syntax
>[[...]] already used by attributes which can be ignored by the compiler, have to choose something else which cannot be ignored
>somehow choose [[=...]] instead of @... (java), #[...] (rust), [...] (c#)
>RANDOM ASS EQUALS SIGN
>annotations appear AFTER the type/storage specifier and not before like every sane language does
who the fuck writes these proposals and how does c++ consistently manage to design the ugliest syntax for new features ever conceived? do they all have brain damage or something?
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3394r0.html
see coderel from pdf
struct Args {
[[=clap::Help("Name of the person to greet")]]
[[=clap::Short, =clap::Long]]
std::string name;
[[=clap::Help("Number of times to greet")]]
[[=clap::Short, =clap::Long]]
int count = 1;
};
int main(int argc, char** argv) {
Args args = clap::parse(argc, argv);
for (int i = 0; i < args.count; ++i) {
std::cout << "Hello " << args.name << '\n';
}
}
>propose reflection for c++26
>add annotations for reflection so you can attach metadata to symbols
>need a new syntax
>[[...]] already used by attributes which can be ignored by the compiler, have to choose something else which cannot be ignored
>somehow choose [[=...]] instead of @... (java), #[...] (rust), [...] (c#)
>RANDOM ASS EQUALS SIGN
>annotations appear AFTER the type/storage specifier and not before like every sane language does
who the fuck writes these proposals and how does c++ consistently manage to design the ugliest syntax for new features ever conceived? do they all have brain damage or something?
https://www.open-std.org/jtc1/sc22/wg21/docs/papers/2024/p3394r0.html
see coderel from pdf
struct Args {
[[=clap::Help("Name of the person to greet")]]
[[=clap::Short, =clap::Long]]
std::string name;
[[=clap::Help("Number of times to greet")]]
[[=clap::Short, =clap::Long]]
int count = 1;
};
int main(int argc, char** argv) {
Args args = clap::parse
for (int i = 0; i < args.count; ++i) {
std::cout << "Hello " << args.name << '\n';
}
}