3 ms·
In my experience Rust is much easier for advanced projects. Once you get into high performance code, C++ takes much more time, for two reasons. 1. With C++ you
by knorker 2y ago
In my experience Rust is much easier for advanced projects. Once you get into high performance code, C++ takes much more time, for two reasons.
1. With C++ you have to think a lot. Like, a lot. To convince yourself that what you are doing is safe, and that the lifetimes and races of various objects are safe. Rust takes a huge load off, by failing to compile your mistakes. You know that for the code that doesn't use "unsafe", if it compiled, then you don't even have to think about races or lifetimes.
2. C++ has so many places where copies sneak in. Tracking down needless copies in C++, for object types where it's not as simple as "just disable copy construct & copy assign", can be tricky and is extremely brittle to future changes of code. And not just for the CPU cost of copies, but RAM costs too.
And I say that as someone who's been coding C++ on a daily basis since the 1990s.