[Haskell-cafe] Errors in non-monadic code

Tom Ellis tom-lists-haskell-cafe-2013 at jaguarpaw.co.uk
Mon Aug 19 23:24:08 CEST 2013

On Mon, Aug 19, 2013 at 05:15:39PM -0400, jabolopes at google.com wrote:
> But I would like to see more code move away from exceptions and into
> types like "Maybe" or "Either" or other types defined for the
> particular situation (as some people were suggesting in the beginning
> of the thread). And the reason for this it is because when you program
> against types you have to make a decision whether to handle the error
> or let it bleed through: you can't ignore the choice because you can't
> ignore the type. On the other hand, with exceptions, you can easily
> forget to handle the exception if you're not looking at the
> documentation at the time when you write the code.

This is /exactly/ the reason to avoid exceptions where possible.


More information about the Haskell-Cafe mailing list