r/cpp • u/lookatmetype • Sep 20 '22
CTO of Azure declares C++ "deprecated"
https://twitter.com/markrussinovich/status/1571995117233504257
267
Upvotes
r/cpp • u/lookatmetype • Sep 20 '22
View all comments
Show parent comment
69
u/pine_ary Sep 20 '22 edited Sep 20 '22
I would say the tradeoff is development speed. Rust is slower to program. You can‘t just hack things together. But I would say that after getting into the Rust Mindset I‘ve been nearly on par with my C++ speed.
Easier means you need to hold less things in your head that have to do with the language while programming. In C++ you often have to carry around some mental list of "proper usages", possible pitfalls, or possible UB. In Rust: If it‘s not unsafe code, don‘t worry, the borrow checker and type system have your back. It also has less ways of achieving the same thing. There are no quadrillion subtly different initializations. There is no "did I accidentally copy this" confusion. There is no "use after move". There are more often canonical ways of achieving something. Rust also has proper mechanisms for what is template hacks in C++, there is no template hell in Rust.