News for hackers. Stuff that matters.
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.
Re:Errors and Exceptions by gorena on Friday August 21, 2015 @10:40AM (#10097757)
True. I could rephrase as "the possibility of errors is just another type, and is best treated as such"?