3 ms·
You don't have to use runtime dispatch in C++. It's pretty easy to just grep and make sure no methods are virtual. You pretty much have to go to town with runti
by a8da6b0c91d 12y ago
You don't have to use runtime dispatch in C++. It's pretty easy to just grep and make sure no methods are virtual. You pretty much have to go to town with runtime dispatch with languages like Java.
On exceptions, the Ada people also came to the conclusion they're necessary and that return code checking is not viable.
- codewiz 12y agoOTOH, GCC and Clang provide warn_unused_result, and it's easy to define types for returning errors from functions that throw a compile-time error if ignored by the caller. I find explicit error handling safer and more elegant than exceptions, especially if you consider that writing exception-safe generic code is hard and error prone.