Oh boy, I just *hate* the idea of C<X> for xor.
Hate it, hate it, hate it! Yuck, yuck, yuck!
But I do like Michael's idea of using C<@> as the hyperoperator marker
(the array connotation works well, I think). The only problem is that
we end up with too many C<@>'s in most expressions:
$count = @a + @b;
@sums = @a @+ @b;
My personal favorite solution is to use square brackets (for their dual
array and indexing connotations, and because they highlight the operator
so nicely):
$count = @a + @b;
@sums = @a [+] @b;
I also think that binary C<!> as a none-ary superposition compositor is
a mistake. And that C<!!> and C<nor> would be even bigger ones. That's
because something like:
if $x ! $y ! $z { ... }
or:
if $x !! $y !! $z { ... }
is surreptitiously negative. Specifically, it's that missing "neither"
in from of the first operand that niggles. I'd much rather people had
to write one of these:
if !($x || $y || $z) { ... }
unless $x || $y || $z { ... }
With that in mind, by freeing up C<^> to resume its original xorish duties,
we get:
unary (prefix) operators:
! - force to bool context, negate
~ - force to string context
+^ - force to numeric context, complement
~^ - force to string context, complement
hyperoperators:
[op] - around any unary/binary operator, "vectorizes" the operator
binary operators:
~ - string concatenation
~= - string append
&& || ^^ // - boolean operations
&&= ||= ^^= //=
and or xor err
+& +| +^ << >> - bitwise operations
+&= +|= +^= <<= >>=
~& ~| ~^ - charwise operations
~&= ~|= ~^=
?& ?| ?^ - [maybe] C-like bool operations
?&= ?|= ?^= - (result is always just 1 or 0)
& | ^ - superpositional operations
&= |= ^= - conjunctive, disjunctive, exclusive
all any one none - conjunctive, disjunctive, exclusive, dismissive
~~ !~ - smart match, smart non-match
Damian