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

2009-12-07 Thread Michael Snoyman
On Tue, Dec 8, 2009 at 7:40 AM, Michael Snoyman wrote: > > > On Tue, Dec 8, 2009 at 1:25 AM, Ben Franksen wrote: > >> Michael Snoyman wrote: >> > On Mon, Dec 7, 2009 at 9:53 PM, Henning Thielemann < >> > lemm...@henning-thielemann.de> wrote: >> >> On Mon, 7 Dec 2009, Michael Snoyman wrote: >> >>

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

2009-12-07 Thread Michael Snoyman
On Tue, Dec 8, 2009 at 1:25 AM, Ben Franksen wrote: > Michael Snoyman wrote: > > On Mon, Dec 7, 2009 at 9:53 PM, Henning Thielemann < > > lemm...@henning-thielemann.de> wrote: > >> On Mon, 7 Dec 2009, Michael Snoyman wrote: > >> I also think that in an earlier mail I answered, that errors can lea

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

2009-12-07 Thread Donn Cave
I'm wondering, what are we talking about here? - the meaning of "error" and "exception"? - personal responsibility when writing programs? - language features - library functions, runtime implementation etc.? The first two, I think could serve as the basis for an entertaining discussion. Whe

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

2009-12-07 Thread Richard O'Keefe
On Dec 8, 2009, at 1:27 PM, Henning Thielemann wrote: On Tue, 8 Dec 2009, Richard O'Keefe wrote: On Dec 8, 2009, at 12:28 PM, Henning Thielemann wrote: It is the responsibility of the programmer to choose number types that are appropriate for the application. If I address pixels on a tod

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

2009-12-07 Thread Henning Thielemann
On Tue, 8 Dec 2009, Richard O'Keefe wrote: On Dec 8, 2009, at 12:28 PM, Henning Thielemann wrote: It is the responsibility of the programmer to choose number types that are appropriate for the application. If I address pixels on a todays screen I will have to choose at least Word16. On 8-bi

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

2009-12-07 Thread Henning Thielemann
On Tue, 8 Dec 2009, Richard O'Keefe wrote: X/0, sqrt(-1), head [] are errors It depends on WHERE THE DATA CAME FROM. If your program actually computes X/0 or sqrt(-1) or head [] your program is buggy, independent from where the zero, the minus one or the empty list comes. Sure, the dist

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

2009-12-07 Thread Henning Thielemann
On Tue, 8 Dec 2009, Ben Franksen wrote: Michael, Henning There are two meanings to the word 'exception' in this context; both of you tend to conflate these different meanings. One meaning is about a *mechanism* for non-local control flow; the other is about certain classes of un-desired progra

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

2009-12-07 Thread Richard O'Keefe
On Dec 8, 2009, at 12:28 PM, Henning Thielemann wrote: representation faults your program tried to do something meaningful but the system was unable to represent the result (integer overflow, upper case of ΓΏ in a Latin 1 system, floating point overflow on a non-IE

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

2009-12-07 Thread Henning Thielemann
On Tue, 8 Dec 2009, Richard O'Keefe wrote: When I was working at Quintus, I came up with a classification which I can simplify something like this: It's certainly possible to classify errors and exceptions in other (also more fine grained) ways ... operating system fault Somethin

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

2009-12-07 Thread Richard O'Keefe
When I was working at Quintus, I came up with a classification which I can simplify something like this: operating system fault Something bad happened (like a remote node going down) that was entirely out of your control. There is nothing you can do to your program to p

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

2009-12-07 Thread Michael Snoyman
On Mon, Dec 7, 2009 at 2:13 PM, Henning Thielemann < lemm...@henning-thielemann.de> wrote: > Michael Snoyman schrieb: > > > > > > On Mon, Dec 7, 2009 at 5:30 AM, Ben Franksen > > wrote: > > > > Michael Snoyman wrote: > > > > > On the other hand, what's so ba

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

2009-12-07 Thread Henning Thielemann
Michael Snoyman schrieb: > > > On Mon, Dec 7, 2009 at 5:30 AM, Ben Franksen > wrote: > > Michael Snoyman wrote: > > > On the other hand, what's so bad about treating errors as exceptions? If > > instead of the program crashing on an array-out-of-bound

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

2009-12-06 Thread Michael Snoyman
On Mon, Dec 7, 2009 at 5:30 AM, Ben Franksen wrote: > Michael Snoyman wrote: > > On Sun, Dec 6, 2009 at 12:55 AM, Henning Thielemann < > > lemm...@henning-thielemann.de> wrote: > >> On Sun, 6 Dec 2009, Michael Snoyman wrote: > >> I think there are plenty of examples like web servers. A text edit