On Wed, Sep 22, 2010 at 4:44 PM, Josh Suereth <[email protected]>wrote:
> I think it's fair to say that this is more expressive than Java exceptio More expressive, maybe, but certainly less useful: the problem with Either is that while it hides the exception inside the monad and possibly short circuit the rest of the expression (I don't even think it does actually since the compiler can't know if a None value is an error or not), it still lets the execution of the rest of the code happily continue after that. The advantage of an exception is that it blows up right away and then bubbles up until it gets caught by a handler that knows how to deal with it. Like Reinier, I don't quite understand how we came to compare the merits of returning error codes versus throwing exceptions, because frankly, this debate was settled more than a decade ago and exceptions won. -- Cédric -- You received this message because you are subscribed to the Google Groups "The Java Posse" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
