3 ms·
> ignored the things C++ does well What are you looking for that Rust is missing?
by moosingin3space 10y ago
> ignored the things C++ does well
What are you looking for that Rust is missing?
- civility 10y agoI wouldn't use the word "missing". I believe several of the Rust language designers are very familiar with C++, and to say that something is missing implies it was an oversight or an accident, or maybe they'll get to it later. Instead, I believe they don't value some of the powerful features in C++ and ignored the fact that other people find those features very valuable. Here's an example that has bitten me several times now. Try and implement the following C++14 code in Rust: template<class T> struct Something { T a, b; }; template<class S, class T> auto operator *(const S& x, const Something<T>& y) { return Something<decltype(S() * T())> { x*y.a, x*y.b }; } There are ugly workarounds, and I'm certain they have their reasons, but it's so much simpler and cleaner in C++.