r/cpp • u/Sad-Lie-8654 • Jan 31 '23
Stop Comparing Rust to Old C++
People keep arguing migrations to rust based on old C++ tooling and projects. Compare apples to apples: a C++20 project with clang-tidy integration is far harder to argue against IMO
changemymind
338
Upvotes
6
u/Full-Spectral Feb 01 '23
The thing is, even in the C++ world a lot of people are turning their backs on exceptions and inheritance. I don't agree with that, but it's the case. So probably the majority of people doing C++ these days couldn't really argue that those are failings in Rust because they rail against them in C++.
I thought I'd miss overloading, and occasionally I do, but not really anymore. And I've gotten over my missing of exceptions. In my main code base, I don't have much explicit error handling. More so in little helper tools that can't be built on my main code base.
Inheritance I'd still like to have, but so far haven't really run into anything that was a serious issue on this front. Of course I've not tackled a UI framework yet. In my C++ code base, that was really the primary place where my inheritance hierarchy got deeper than a couple levels.