3 ms·
Both C++ and Rust are rather complex. But in Rust the negative effects of the complexity are mostly contained by the compiler (i.e. if you get it wrong you get
by dathinab 5y ago
Both C++ and Rust are rather complex.
But in Rust the negative effects of the complexity are mostly contained by the compiler (i.e. if you get it wrong you get a compiler error).
In C++ it on the other side can easily lead to UB and in turn to potential security vulnerabilities.
So IMHO today there are _very_ few cases where C++ is still the appropriate choice.
Just to be clear I'm not saying rust did replace C++, but there is a wide variety of languages which are a better choice for many use-cases which once where filled by C++. Rust just further reduces use-cases where I would say C++ is appropriate.
But it's anyway not Doomed as there are just way to many existing projects. Not just legacy projects, but existing still maintained for many years projects.