News for hackers. Stuff that matters.
Re:Errors are values by spion on Tuesday January 13, 2015 @10:38AM (#8880451)
That defeats the point of having a type system (casting is as error prone as forgetting to check errors).

Also it doesn't allow for the use of already defined functions to do the transformations, (e.g. `maybe.flatMap(existingFn).flatMap(otherFn)` wont ever work, new closures will have to be defined that do casts before calling the existing functions).

So basically, its just-as-error-prone and just-as-tedious as checking error codes but in a different way. Both benefits of the pattern are gone. Given this, I don't think that the word "impossible" is a stretch at all (not having any of the benefits of the pattern = not implementing the pattern)

There are no comments on this comment yet.