News for hackers. Stuff that matters.
Re:Railway oriented programming by exDM69 on Thursday June 23, 2016 @05:34AM (#11959766)
IO errors, division by zero and other truly exceptional situations are well suited for exceptions.

Validation cases like the examples on the article are not exceptional and the failure cases must be handled properly. In this case it makes sense to use an Either -like solution where the compiler will warn if there are unhandled cases.

Both styles of error handling are useful in some cases and both have their issues.

There are no comments on this comment yet.