[Haskell-cafe] Re: ANNOUNCE: Utrecht Haskell Compiler (UHC) -- first release

Richard O'Keefe ok at cs.otago.ac.nz
Fri Apr 24 01:49:11 EDT 2009

On 23 Apr 2009, at 9:02 pm, Lennart Augustsson wrote:

> On Thu, Apr 23, 2009 at 6:30 AM, Richard O'Keefe <ok at cs.otago.ac.nz>  
> wrote:
>>  - a somewhat bogus claim about how much of the library you need to
>>   know how to use it (of COURSE you need to know about integers in
>>   order to use an integer operation, what's so bad about that?)
>>  - the claim that + doesn't mean + (this is really an argument about
>>   the scope of + and could have been dealt with by ruling that n+k
>>   is only available when the version of + in scope is the one from
>>   the Prelude)
> What's bogus about that claim?  Then n+k patterns have type (Integral
> a) => a, so you need to know about type classes and Integral.

One thing that is "bogus" is the apparent suggestion that the amount
you have to know about the library is EXCESSIVE.

The other thing is that in fact it's not true.  Students can
perfectly well learn how to use n+k patterns at a time when
the only numeric type they know about is Int.  When they learn
that there are other numeric types, they have to learn about
type classes if they want to understand what they are doing
when they use ">=" or "-".  So it simply isn't true that
understanding n+k patterns requires any *MORE* understanding
of type classes than understanding the contorted code required
to replace them.

> Even if it's listed as a reason, you rest assure that the Haskell'
> committee did consider how widespread the use of n+k was before
> removing it.  Of course, this can only be an educated guess.

I did try finding something about the reasons for the choices
made, but in this case was unable to find anything beyond the
originally listed pros and cons.

Given Haskell's "avoid success" ethos, I'm actually of the
opinion that the Haskell' committee SHOULDN'T consider how
widely spread the use of some feature is or isn't.  It's
good if they don't go the CORBA route and standardise features
that have never been implemented, let alone used.  I can
imagine very widely used features being RIGHTLY removed, as
Classic C function headers were removed from C99.

> Of course, n+k will be missed by Haskell obfuscators.  I mean, what
> will we do without
>  (+) + 1 + 1 = (+)
> ?

Haskell obfuscators have such a vast playground that the
loss of n+k will go completely unnoticed by them.

More information about the Haskell-Cafe mailing list