3 ms·
Checked exceptions are far from fine, and this has nothing to do with IDE code generation. Monads are highly cumbersome, unwieldy, and difficult to use, but Ha
by sreque 6y ago
Checked exceptions are far from fine, and this has nothing to do with IDE code generation.
Monads are highly cumbersome, unwieldy, and difficult to use, but Haskell programmers put up with them anyways because they get specific value from them, being able to say things like:
* effect tracking
* continuations
* tracking which methods perform I/O
* tracking errors
Java checked exceptions are like monads, but worse: they are even more unwieldy and interact poorly with the rest of the language. And yet, unlike monads in a language like Haskell, they provide practically zero value for their cost.
There is a reason no language since Java has copied checked exceptions as a feature, including C# which started as a direct rip-off of Java. There are better ways to encode errors into a method signature to try to force the caller to consider them than checked exceptions.