3 ms·
> You can do everything you can do with C++ static reflection. Are you really sure about that? I have a slight problem with such sweeping statements and also
by spacechild1 5mo ago
> You can do everything you can do with C++ static reflection.
Are you really sure about that?
I have a slight problem with such sweeping statements and also with your original claim that "Rust's metaprogramming capabilities are now on par with C++". I think you can only make such claims if you know both languages really, really well.
That being said, I acknowledge that Rust's metaprogramming capabilities have improved significantly in recent years.
> Both have been added and expanded.
In stable Rust?
- dwattttt 5mo agoIt's hard to be concrete without talking about something specific. At the limit, in stable Rust (for 8 years?), a proc_macro consumes and emits an arbitrary token stream at compile time; it's not ergonomic, but it's possible. The equivalent in C++ is in the realm of arbitrary codegen.