[Haskell-cafe] Why is $ right associative instead of leftassociative?

Jon Fairbairn jon.fairbairn at cl.cam.ac.uk
Sun Feb 5 06:42:08 EST 2006

On 2006-02-04 at 21:15GMT "Brian Hulley" wrote:
> Stefan Holdermans wrote:
> > Hash: SHA1
> >
> > Brian wrote:
> >
> >> I think the mystery surrounding :: and : might have been that
> >> originally people thought type annotations would hardly ever be
> >> needed whereas list cons is often needed, but now that it is
> >> regarded as good practice to put a type annotation before every top
> >> level value binding, and as the type system becomes more and more
> >> complex (eg with GADTs etc), type annotations are now presumably far
> >> more common than list cons so it would be good if Haskell Prime
> >> would swap these operators back to their de facto universal
> >> inter-language standard of list cons and type annotation
> >> respectively.
> >
> > I don't think Haskell Prime should be about changing the look and
> > feel of the language.
> Perhaps it is just a matter of aesthetics about :: and :, but I really feel 
> these symbols have a de-facto meaning that should have been respected and 
> that Haskell Prime would be a chance to correct this error. However no doubt 
> I'm alone in this view so fair enough

Not exactly alone; I've felt it was wrong ever since we
argued about it for the first version of Haskell. ":" for
typing is closer to common mathematical notation.

But it's far too late to change it now.

> - it's just syntax after all

It is indeed.


Jón Fairbairn                              Jon.Fairbairn at cl.cam.ac.uk

More information about the Haskell-Cafe mailing list