Larry Wall wrote: > : $x ~& $y # bitwise and > : $x ~| $y # bitwise or > : > : ~!$x # bitwise not > > I think I like that. Except now we'll get things like: > > @x ^~|= @y; > > Hmm...and then there's: > > $a ~? $b ~: $c
I don't think they're too problematic. Most people shouldn't need to know the bitwise stuff, and for those who do a consistent prefix makes it easier to learn. It's rare enough to need bitwise things in Perl 5 (outside golf). I'm hoping that it'll be even rarer in Perl 6, as better interfaces are designed for the things which at present require flipping individual bits. > And what's bitwise xor? How about keeping caret for xor? $a ~^ $b # bitwise xor $a ^^ $b # logical xor I don't think those will clash with the hyper operator. Hmmm. I'm not sure they look sufficiently different from each other though. And it does lead to: @a ^^^ @b @a ^~^ @b The first of those contains a tripled operator (the thing I was trying to avoid when I started this suggestion). And both of them run the risk of looking like they're underlining whatever's on the line above rather than being operators ... Smylers