patch applied (haskell-prime-status): add ""Make $ left associative, like application"

Cale Gibbard cgibbard at gmail.com
Thu Apr 24 15:09:20 EDT 2008


2008/4/24 Wolfgang Jeltsch <g9ks157k at acme.softbase.org>:
> Am Mittwoch, 23. April 2008 01:20 schrieb Duncan Coutts:
>  > […]
>
>
>  > Surely there was a justification to having $ be the opposite
>  > associativity from application and not just a different precedence. Does
>  > anyone know what it was?
>
>  Probably the fact that you can write
>
>  > f $ g $ h $ u $ v $ w $ x
>
>  instead of
>
>  > f (g (h (u (v (w x)))))
>
>  and thereby avoid building forests of parantheses.
>
But of course, f . g . h . u . v . w $ x means the same thing, and has
nicer properties with regard to refactoring and formal reasoning due
to the associativity of (.), so probably not a whole lot of thought
went into the choice.

 - Cale


More information about the Haskell-prime mailing list