4 ms·
> Rust will never displace C++ or C. C++ does things Rust can't. Could you expand a little bit on that?
by farresito 6y ago
> Rust will never displace C++ or C. C++ does things Rust can't.
Could you expand a little bit on that?
- steveklabnik 6y agoThere are some meta programming features C++ has that Rust doesn’t, like “template non-type parameters” and “template template parameters.” The former is called “const generics” in Rust, and is still in development, and the latter is “higher kinded types,” which Rust may or may not ever get.
- ncmncm 6y agoThe language enables a kind of calculus on types, that libraries routinely use to get better performance, better compile-time error detection, and to direct control to the best code path. C++20 just got "concepts", which make this capability vastly easier to use when creating a library, and enable some new capabilities along the same lines, while greatly improving compile-time error reports.
- ncmncm 6y agoI should add that asking about C++ is absolutely the wrong response if you are interested in saving Rust from scheduled oblivion. What it needs are active measures to increase its adoption rate by orders of magnitude. Hype on HN only goes a little way.