[Haskell-cafe] Desugaring of infix operators is (always?) the
wrong way round
Dan Piponi
dpiponi at gmail.com
Tue Sep 25 16:30:13 EDT 2007
On 9/25/07, Brian Hulley <brianh at metamilk.com> wrote:
> ...I seem to dimly recall that there is a natural language
> somewhere that also uses it but I can't remember which one.
Every permutation of [S,V,O] appears in 'nature':
http://en.wikipedia.org/wiki/Word_order.
> Also, a problem might be that it is not so easy to use the
multiple-clause style of function definition
I disagree, it's easier with postfix functions. With prefix functions,
to get line-up you insert space in the middle of the line. With
postfix notation you would often insert space at the beginning of a
line, a much easier place to insert text, because there is a
keystroke, in most text editors, to take you to the beginning of a
line.
> It's not so clear to me what the syntax for types should be in a postfix language.
Postfix, of course! So you'd write
data a Tree = Leaf | a a Tree
Confusingly, ocaml does something like this, with postfix notation for
types and prefix notation for function application.
--
Dan
More information about the Haskell-Cafe
mailing list