[Haskell-cafe] Desugaring of infix operators is (always?) the wrong way round

Dan Weston westondan at imageworks.com
Tue Sep 25 15:25:16 EDT 2007

Wise your proposal is. Too long the desugaring I of languages functional 
not understanding have labored. Anastrophe the rule should be. Working 
have I been on a language Yoda that these rules implements it aspires to.

If the lojban/loglan schism is any precedent, Yoda will split soon 
enough into prefix and postfix camps!

Jonathan Cast wrote:
> On Tue, 2007-09-25 at 19:18 +0100, Brian Hulley wrote:
>> Brian Hulley wrote:
>>> I'm wondering if anyone can shed light on the reason why
>>>    x # y
>>> gets desugared to
>>>   (#) x y
>>> and not
>>>   (#) y x
>>> Can anyone think of an example where the current desugaring of infix 
>>> arguments gives the correct order when the function is used in a 
>>> postfix application? (apart from commutative functions of course!)
>> Sorry I meant to write "*prefix* application"
> Of course, this is all a consequence of the well-known failure of
> natural language: verbs come before their objects.  It is thus natural
> to write f(x), when in fact it is the object that should come first, not
> the function.  Switching to a (natural) language where (finite) verbs
> come at the end of sentences, where they belong, should fix this issue
> in time.  Doing the same in a functional language would be ideal as
> well, but might limit its use among those who speak inferior natural
> languages.
> jcc
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

More information about the Haskell-Cafe mailing list