Comment by adev_
3 days ago
> And like always, the problem std::meta is purported to solve has been solved for years.
It is rare to read something more moronic than that
The Rust equivalent of std::meta (procedural macros) are heavily used everywhere including in serialization framework, debugging and tracers.
And that's not surprising at all: Compile time introspection is much more powerful and lightweight than codegen for exactly the same usage.
> It is rare to read something more moronic than that
It's not actually wrong though is it - real codebases have been implementing reflection and introspection through macro magic etc. for decades at this point.
I guess it's cool they want to fix it in the language, but as always, the approach is to make the language even more complex than it already is - e.g. two new operators (!) in the linked article
> been implementing reflection and introspection through macro magic etc. for decades at this point.
Having a flaky pile of junk as an alternative is never been an excuse to not fix the problem properly.
Every proper modern language (Rust, Kotlin, Zig, Swift, even freaking Golang) has a form of runtime reflection or static introspection.
Only C++ does not. It was done historically with a mess of macros or a pre-compiler (qt-moc) that all have an entire pile of issue.
> the approach is to make the language even more complex than it already is - e.g. two new operators
The problem of rampant complexity in C++ is not so much about the new features when they bring something and make sense.
It is about its inability to remove the old stuff even if it is consensual that it is garbage (e.g iostreams).
> Having a flaky pile of junk as an alternative is never been an excuse to not fix the problem properly.
Thank you. Some people use the phrases "real projects" and "production code" as if they imply some standard of high quality.