Larry Wall wrote:
> : > Now I'm wondering whether these should be split into:
> : >
> : > +& +| +! - bitwise operations on int
> : > +&= +|= +!=
> : >
> : > ~& ~| ~! - bitwise operations on str
> : > ~&= ~|= ~!=
Well, wait, these might have some promise, I think. Using the '.' for
them is still a little non-intuitive, even though it is very bit-like.
(We're going to be using the dot everywhere else to mean 'method', I
don't know if it's obvious that the dot will, in this one context, mean
something completely different?) And bitwise-string and bitwise-int are
pretty different, and those (above) look pretty much like what they are...
> Yes, but we certainly can't have !=. Another argument for not using
> ! for xor. I guess _ is available as a kind of | laying down.
> Can't have "x". We could use "o" as short for "one or other".
> $either = 1 o 2;
In a fever dream, I was once hoping that we could introduce 'o' or maybe
'c' to mean 'octal', to solve one of the most annoying things computing
has inflicted upon me:
123 # 123, decimal
0123 # 123, octal. WHAT??? WHY???
'0123' # FINE, so what's this, and why???
and changing that to:
0123 # decimal
0b0110 # binary
0o123 # octal
0x123 # hex
I know, I know, that's completely not-the-culture. Just always bugs me.
Stupid tradition. :-P
MikeL