3 ms·
Checked exceptions are the compiler forcing the developer to consider error cases. What's not to like about that? Contrast with all the other approaches (runt
by hota_mazi 8y ago
Checked exceptions are the compiler forcing the developer to consider error cases.
What's not to like about that?
Contrast with all the other approaches (runtime exceptions, return codes, Either/Result, etc...) where the developer can happily ignore errors, the code will compile, and then crash at runtime.
- erik_seaberg 8y agoI'd be happier with checked exceptions if Java assumed that list.stream().map(doStuff) might throw whatever doStuff might throw, but instead map is defined so that doStuff can never throw any checked exception, which requires smuggling out every real-world failure mode.