News for hackers. Stuff that matters.
Re:Performance of Rust Language [pdf] by spacechild1 on Tuesday May 26, 2026 @06:54PM (#48287122)
> 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?

Re:Performance of Rust Language [pdf] by dwattttt on Tuesday May 26, 2026 @07:32PM (#48287437)
It'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.