Re: Operator sub names are not special

2005-09-03 Thread Yuval Kogman
On Sat, Sep 03, 2005 at 11:45:33 +0300, Yuval Kogman wrote a lot. I'd like to summarize: * if operators are not special than they are defined in perl 6 (maybe) * if operators are defined in terms of other operators, then overriding an operator may interfere with t

Re: Operator sub names are not special

2005-09-03 Thread Yuval Kogman
On Thu, Sep 01, 2005 at 17:12:51 +, Luke Palmer wrote: > On 9/1/05, Yuval Kogman <[EMAIL PROTECTED]> wrote: > > On Wed, Aug 31, 2005 at 13:43:57 -0600, Luke Palmer wrote: > > > Uh yeah, I think that's what I was saying. To clarify: > > > > > > sub foo (&prefix:<+>) { 1 == 2 }# 1 and 2

Re: Operator sub names are not special

2005-09-01 Thread Luke Palmer
On 9/1/05, Yuval Kogman <[EMAIL PROTECTED]> wrote: > On Wed, Aug 31, 2005 at 13:43:57 -0600, Luke Palmer wrote: > > Uh yeah, I think that's what I was saying. To clarify: > > > > sub foo (&prefix:<+>) { 1 == 2 }# 1 and 2 in numeric context > > foo(&say); # nothing printed > > > > But

Re: Operator sub names are not special

2005-09-01 Thread Yuval Kogman
On Wed, Aug 31, 2005 at 13:43:57 -0600, Luke Palmer wrote: > Uh yeah, I think that's what I was saying. To clarify: > > sub foo (&prefix:<+>) { 1 == 2 }# 1 and 2 in numeric context > foo(&say); # nothing printed > > But: > > sub foo (&prefix:<+>) { +1 == +2 } > foo(&say);

Re: Operator sub names are not special

2005-08-31 Thread Luke Palmer
On 8/31/05, Yuval Kogman <[EMAIL PROTECTED]> wrote: > On Wed, Aug 31, 2005 at 04:56:25 -0600, Luke Palmer wrote: > > > (That is, lexically binding &prefix:<+> does not change things in > > numeric context; only when there's actually a + in front of them) > > Unless you override &prefix:<+> ? > >

Re: Operator sub names are not special

2005-08-31 Thread Yuval Kogman
On Wed, Aug 31, 2005 at 04:56:25 -0600, Luke Palmer wrote: > (That is, lexically binding &prefix:<+> does not change things in > numeric context; only when there's actually a + in front of them) Unless you override &prefix:<+> ? sub foo (&prefix:<+>) { +1 } -- () Yuval Kogman <[EMAIL PROTECT