On 11/22/05, Larry Wall <[EMAIL PROTECTED]> wrote:
> What tipped me over the edge, however, is that I want ^$x back for a
> unary operator that is short for 0..^$x, that is, the range from 0
> to $x - 1.  I kept wanting such an operator in revising S09.  It also
> makes it easy to write
>     for ^5 { say }  # 0, 1, 2, 3, 4

I read this and I'm trying to figure out why P6 needs a unary operator
for something that is an additional character written the more legible
way. To me, ^ indicates XOR, so unary ^ should really be the bit-flip
of the operand. So, ^0 would be -1 (under 2's complement) and ^1 would
be -2. I'm not sure where this would be useful, but that's what comes
to mind when discussing a unary ^.


Reply via email to