7 ms·
It can't do exceptions or inheritance It is more a C replacement
by benibela 5y ago
It can't do exceptions or inheritance
It is more a C replacement
- nrr 5y agoIs inheritance really that critical a language feature?
- tialaramex 5y agoRust also can't overload operator&& and lacks the "macro pre-processor" that was already a bad idea in the 1970s. Absence of specific footguns is not something people will mourn. To the extent that you should have exceptions in your software, Rust's panic picks that slack up pretty well, and to the extent you should have error handling C++ exceptions were a bad idea and sum types like Result are much better. Note that although Rust's types don't have inheritance the traits they can implement do. Which is much more likely to be something you actually wanted than say, C++ multiple inheritance.
- int_19h 5y agoIt can do flow-through error handling and code reuse. Exceptions and inheritance are just two particular ways to achieve those goals.