On Fri, Sep 09, 2005 at 04:58:37PM +0200, Ingo Blechschmidt wrote:
: Hi,
: 
: Juerd wrote:
: > Infix? Infix operators are binary, comma is not.

That infix operators are always binary is just a cultural assumption
based on the historical restriction to right-associative and
left-associative operators.  But we've now got list-associative as
well, which is one of the reasons we changed the syntactic category
from binop: to infix: instead.  (And also because uniop: didn't distinguish
prefix from postfix operators.)

: I took the name from Pugs's PIL. The signature of &infix:<,> is ([EMAIL 
PROTECTED]),
: so it isn't strictly binary, of course.

Infix is fine for that.  The associativity is a trait of the operator
that doesn't appear in a mere reference to it.

: I think the name &infix:<,> is based on the names of the chained
: comparators:
: 
:     1 < 2 < 3;              # is really
:     &infix:{"<"}(1, 2, 3);
: 
: (This is, as far as I know, not specced. Take it as an report on Pugs's

Which is also, of course, what

    [<] 1,2,3

turns into--unless it just turns directly into bool::true.  :-)

Larry

Reply via email to