[Haskell-cafe] Re: [m..n] question

Brandon S. Allbery KF8NH allbery at ece.cmu.edu
Wed Sep 24 00:58:14 EDT 2008

On 2008 Sep 22, at 5:46, Jon Fairbairn wrote:
> "Richard A. O'Keefe" <ok at cs.otago.ac.nz> writes:
>> It is being claimed that the reason for this is that "exceptions
>> are problematic" in Hasell, so the Haskell designers went out of
>> their way to make this function total whether it made sense or not.
> I'm pretty sure that's not true.  I'd like to be able to say
> "I know, I was there", but although I was there it was so
> long ago that my memory isn't clear.  But it's clearly the

I would say it's more a matter of Haskell programmers thinking partial  
functions are evil as a general (mathematical) principle.  And the  
claimant above is thinking of needing to catch exceptions in IO, and  
probably comes from the school of programming that says that invalid  
values should raise exceptions.  Which sounds like a good idea until  
you see how often people do try {mumble()} catch {} or similar.  (Go  
look at some Java programs; Java goes even farther with that idea and  
requires programmers to declare the exceptions they can throw, so many  
programmers shortcircuit the exceptions away to avoid having to deal  
with it.)

brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery at kf8nh.com
system administrator [openafs,heimdal,too many hats] allbery at ece.cmu.edu
electrical and computer engineering, carnegie mellon university    KF8NH

More information about the Haskell-Cafe mailing list