Although I think that not having exceptions and inheritance are really big lackings, the thing is that there's such an anti-OOP backlash these days that large numbers of people will argue that Rust not having those are good things. I don't agree but lots of people would.
They do have generics. Not as extensive as C++, but this is one area where I'm no the other side of the fence and think that C++ has gone a bit over the edge on templates, meta-programming and compile time evaluation stuff. I'm not sure I'd want Rust to try to compete on that front.
I'm a big fan of OOP by some definition, but I don't necessarily care for inheritance as an important feature. Also, I've been coding on C++ without exceptions for almost the entire time i've coded in C++, since they disabled on many platforms for microcontrollers.
And iirc, google's style guide doesn't want you to use exceptions either if you're working with google libraries like Abseil and similar projects. C++ is plenty useful without them.
I guess what i'm saying is that I don't consider either of those features as reasons to use or not use C++.
I've made immense good use of both of them, and consider them huge advantages C++ has over Rust. Which sort of speaks to how important I consider the memory safety that I've moved to Rust.
Of course mostly I'm talking about commercial development. Personal projects that have no commercial pressures, no continuity issues, ability to make sweeping changes where required, lots of TLC, etc... can be done at high quality in C++ even at scale and over extended periods of time. I have one myself that I'd put up against anybody's in terms of quality.
But in commercial terms, where software is developed under so far from ideal conditions, that memory safety and an*l-retentive nature of Rust could be a life saver.
24
u/AlexAlabuzhev Dec 07 '21
Without exceptions, templates, inheritance?
Good luck with that.