3 ms·
> What really drives me nuts is when the same person shits on checked exceptions and then advocates for using a monadic return value. They're completely isomorp
by saghm 7y ago
> What really drives me nuts is when the same person shits on checked exceptions and then advocates for using a monadic return value. They're completely isomorphic. The only difference is in how it reads.
Is that true? I was under the impression that annotating a certain type of exception being thrown doesn't prevent other (i.e. unchecked) exception types from being thrown from a method. If that's true, then that's a pretty significant different between monadic returns and checked exceptions; in the former case, returning an unknown error type leads to a compiler error, but in the latter, it leads to a crash at runtime.
- RivieraKid 7y agoUnchecked exception can be thrown and cause a crash in both cases.