On Mon, Aug 19, 2013 at 5:24 PM, Tom Ellis < tom-lists-haskell-cafe-2...@jaguarpaw.co.uk> wrote:
> On Mon, Aug 19, 2013 at 05:15:39PM -0400, jabolo...@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. > > Tom > > And tangentially related, it's why Go uses error return values (with functions being able to "return multiple values"), e.g. http://blog.golang.org/error-handling-and-go
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe