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

Henning Thielemann lemming at henning-thielemann.de
Mon Feb 6 08:12:44 EST 2006


On Sun, 5 Feb 2006, Lennart Augustsson wrote:

> I don't use lists very much.  They are not the right data structure
> for many things.

Certainly, but lists are useful as interim data structure or for
initialising complex data structures.

> So : is not as common as :: in my code. I checked a small sample of
> code, about 20000 lines of Haskell. It has about 1000 uses of ':' and
> 2000 of '::'.
>
> In my opinion all the special syntactic sugar for lists should go
> away.  I don't think lists are special enough to motivate it.

Fine, someone shares my attitude towards the list sugar. Nevertheless, do
you mean with 'no sugar for lists' also no infix operator for list
construction? I would still like an operator of low precedence for list
construction for writing e.g. (1,'a"):(2,'b'):[].

> But this is not what Haskell' is about.  It's supposed to be some
> modest extensions to Haskell.  Not designing a new perfect language.

Yes, this discussion is definitely beyond Haskell'.



More information about the Haskell-Cafe mailing list