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

Bill Wood william.wood3 at comcast.net
Sun Feb 5 16:12:13 EST 2006

On Sun, 2006-02-05 at 13:49 +0100, Tomasz Zielonka wrote:
   . . .
> and I want to add some transformation between g and z I have to
> change one line and insert another
>     f x y .
>     g x .
>     h x y $
>     z

> With right-associative $ it would be only one line-add. Probably not a
> very strong argument.

Maybe stronger than you think.  I know that one of the arguments for
making ";" a C-style delimiter rather than a Pascal-style separator is
that adding a new statement at the end of a series is error-prone -- one
tends to forget to add the ";" in front of the new statement (and one
reason Pascal syntax included the "null" statement was so that "s1;"
would parse as "s1; null", making ";" a de facto delimiter).

Editing ease matters more than a little.

 -- Bill Wood

More information about the Haskell-Cafe mailing list