Larry wrote:
: Hmmmm. I quite like that too. :-)
Except what about unary xor, i.e. 1's complement?
I was carefully ignoring that. ;-)
Besides, Windows programmers would continually be writing
$a / $b
and wonder why they don't get one($a,$b);
<grin>
: > Also, a question about superpositions: Is
: > : > $x = 1 | 2 | 3
: > : > equivalent to
: > : > $x = 1 | 2
: > $x |= 3
:
: No. The precedence is wrong.
How so?
The former does the two |'s then a single assignment.
The later does one |, and assignment, another |, and then another assignment.
The difference might be significant, under overloading.
It's not clear that that shouldn't do the Right thing just like
$a < $b < $c
Well, I'd certainly be in favour of that!
So why not just make it the same? Otherwise you can't really use |=
to add to a set like you wanted. All you can do is make a new set that
holds the old set plus the new member, which isn't the same thing, since
in set theory a set is a thing distinct from its members.
Agreed. I'd certainly prefer it to DWIM.
I think we should make people people write any(any(1,2),3) if that's the
weird thing they want. I think | and & should automatically reduce
as long as you're combining similars.
Agreed.
Damian