|
|
|
|
|
by wyager
4257 days ago
|
|
>plenty of libraries which have no qualms about using exceptions in the real world I haven't run into too many (particularly when compared to the popularity of exceptions in other languages). >the latter results usually in a "god error type" which breaks modularity. Have you tried using Either with a sum error type and/or an error typeclass? |
|
This doesn't mean much if you take a language like Java where it is the idiomatic way of handling errors. But take something vaguely complex like http-client (formerly http-conduit) and you get exceptions.
> Have you tried using Either with a sum error type and/or an error typeclass?
Well, even with sum types you get "god errors" which encapsulate all kinds of issues that can happen in your exception, because it's the path of least resistance. I haven't tried Either with a typeclass, though, but it sounds vaguely abusive.