[Haskell-cafe] Re: New Hackage category: Error Handling

Michael Snoyman michael at snoyman.com
Mon Dec 7 14:20:09 EST 2009

On Mon, Dec 7, 2009 at 9:07 PM, Henning Thielemann <
lemming at henning-thielemann.de> wrote:

> On Mon, 7 Dec 2009, Michael Snoyman wrote:
>  The only opinion I've stated so far is that it's ridiculous to constantly
>> demand
>> that people follow your definition of error vs exception, since the line
>> is incredibly
>> blurry and it buys you very little.
> If you have an example that is not contained in my article on the Haskell
> Wiki, where you think the error vs. exception distinction is not
> appropriate, please let me know and will think about it.
> http://www.haskell.org/haskellwiki/Error_vs._Exception

I think it's a silly, unnecessary distinction. Sure, when you're teaching
beginning programmers how to deal with out-of-bounds versus file not found,
you can use the terminology. But as far as insisting that library authors
have their programs die on an error, it's pointless. Having errors thrown as
their own type of exception (like AssertionFailed, for example) is a much
more resilient option, and for decent programmers who understand they
shouldn't just catch every exception and return a default value, there is no
downside. I don't care to make systems less resilient to deal with the
sub-par programmer.

I turn it around: give me an example where it's better for the runtime to
exit than for some type of exception to be thrown, and *I'll* think about it

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20091207/a69ddb10/attachment.html

More information about the Haskell-Cafe mailing list