Re:Errors and Exceptions
by cousin_it on Friday August 21, 2015 @10:25AM
(#10097654)
How about using an algebraic effect system? That's sort of a general purpose alternative to monads that also doesn't require an extra code path, and adds a bit of theoretical niceness. For example, if your code can throw two different exceptions, composing two monads is order-sensitive (because the monad interface is in some sense too general and forgets too much), while algebraic effects always commute with each other.
[ Parent
| on HN ]