|
|
|
|
|
by cogman10
20 days ago
|
|
> modern C++ is notably more performant than C and by implication Rust I don't think this holds. Rust has the same facilities which C++ has. Rust's metaprogramming capabilities are now on par with C++ (they weren't always). Rust has a similar generics implementation which allows it to do what C++ does in terms of method dispatch and generation. And now Rust has pretty much the same compile time constant generation capabilities that C++ has. I don't think there's a part of C++ which isn't in Rust at this point. The only thing potentially missing is the experience and investment using those features. |
|
Is that really true, though? I haven't really written any Rust code, so I have no idea, but I don't think Rust has static reflection. Also, aren't const generics much more limited? I've also heard there is no template specialization and no "if constexpr". Or what about dynamic allocations in constexpr functions?