3 ms·
Well, nowadays all checked exceptions are considered to be a mistake.
by kovrik 8y ago
Well, nowadays all checked exceptions are considered to be a mistake.
- i386 8y agoIt’s explicit and encourages the consumer to handle errors correctly. The negatives seem to be cosmentic arguments.
- Salgat 8y agoForcing the programmer to add handlers for exceptions he may not even want to handle (sometimes it's okay to pass it up the call stack) just creates a mess in the source code. It's fine as a suppressible compiler warning, but not as a compiler error.
- kuschku 8y agoWell, in modern languages, the same concepts are all coming back. Go has its product types for errors, and Rust uses sum types. As result you end up with basically the same code as with exceptions, just even more verbose.