On Sat, 12 Oct 2002, Dan Kogai wrote:
: Objection, your honor.
:
: perl5 ($x & $y) might be uncommon enough to justify this. But how
: about &= vs. &&=, |= vs. ||= ? Those are both used very often so by
: saving one symbol we lose consistency.
Ouch. You're right. That's a bit of a problem for bits($x | $y) too.
Hmm.
@a ^|||= 1;
@a ^bor= 1;
@a ^.|= 1;
Yow. Those are all pretty ugly. But the first one is the least ugly.
And I really do like | for any(). And I can see using it like this:
@cases ^|= @newcases;
to mean
for @cases | @newcases -> $x is rw | $y {
$x = any($x, $y);
}
Another question is whether using a superposition to represent parallel
streams in "for" is doing the "any" concept too much violence. Really,
it's more of a hyper-any, at least on the left:
for @cases ^| @newcases -> $x is rw | $y {...}
But note that ^& automatically gives us the shorter of the two lists.
Maybe...
Just thinking... :-)
Larry