3 ms·
> Checked exceptions are horrid. Came here to say exactly this. Exceptions are a poor-man's implementation of an error-handling applicative or monad type. Ch
by WkndTriathlete 4y ago
> Checked exceptions are horrid.
Came here to say exactly this. Exceptions are a poor-man's implementation of an error-handling applicative or monad type. Checked exceptions are especially terrible because their usage forces handling of exceptions in every layer of the call stack above the point where the checked exception might be thrown instead of simply writing a single exception handler at an appropriate layer.
- mrkeen 4y ago> Exceptions are a poor-man's implementation of an error-handling applicative or monad type. True, but in those languages, exceptions can be thrown from anywhere anyway. > Checked exceptions are especially terrible because their usage forces handling of exceptions in every layer of the call stack above the point where the checked exception might be thrown That's not true. Handling a checked exception in one layer means you don't need to handle it in the above layers.
- kaba0 4y agoMy opinion is that error-handling sum types are a poor-man’s checked exception :D Here are my reasons for thinking so: https://news.ycombinator.com/item?id=32944346 https://news.ycombinator.com/item?id=32944346