On 2008 Sep 22, at 5:46, Jon Fairbairn wrote:
"Richard A. O'Keefe" <[EMAIL PROTECTED]> 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] [EMAIL PROTECTED]
system administrator [openafs,heimdal,too many hats] [EMAIL PROTECTED]
electrical and computer engineering, carnegie mellon university KF8NH
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe