Timeline for Why use Either over (checked) Exception?
Current License: CC BY-SA 3.0
4 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Oct 31, 2024 at 0:35 | comment | added | Basilevs | Why is Exception a side effect? Is not it just a part of implicit return type? | |
| Sep 8, 2016 at 18:36 | comment | added | Eyal Roth | And I can't really argue with "purely functional" reasoning, can't I? | |
| Sep 8, 2016 at 18:36 | comment | added | Eyal Roth | Love the answer, though I still don't see why should I forgo Exceptions. Either seems like a great tool, but yes, I'm specifically asking about handling failures, and I'd rather use a much more specific tool for my task than an all-powerful one. Deferring failure handling is a fair argument, but one can simply use Try on a method throwing an Exception if he wishes not to handle it at the moment. Doesn't stack-trace unwinding affect Either/Try as well? You may repeat the same mistakes when propagating them incorrectly; knowing when to handle a failure is not trivial in both cases. | |
| Sep 8, 2016 at 17:51 | history | answered | Jörg W Mittag | CC BY-SA 3.0 |