3 ms·
About the dependency between constructors and inheritance, I like how rust handled the situation. In rust you do not have any constructors, but instead you can
by lasagnaphil 9y ago
About the dependency between constructors and inheritance, I like how rust handled the situation. In rust you do not have any constructors, but instead you can make a factory method that returns an Option<T> or Result<S, E>, so no need for any exceptions while construction. You can also do this in C++, but you still have to declare constructors anyway, along it being a bit inconsistent with other idiomatic C++ code...