>>>>> "DC" == Damian Conway <[EMAIL PROTECTED]> writes:
DC> Oh boy, I just *hate* the idea of C<X> for xor.
DC> Hate it, hate it, hate it! Yuck, yuck, yuck!
tell us how you _really_ feel! :-)
DC> My personal favorite solution is to use square brackets (for their dual
DC> array and indexing connotations, and because they highlight the operator
DC> so nicely):
DC> $count = @a + @b;
DC> @sums = @a [+] @b;
DC> [op] - around any unary/binary operator, "vectorizes" the operator
that is actually very neat IMO. it does read well and makes sense too.
DC> unary (prefix) operators:
DC> ! - force to bool context, negate
DC> ~ - force to string context
DC> +^ - force to numeric context, complement
DC> ~^ - force to string context, complement
what is a string complement? bitwise? i take it the numeric is one's
complement.
DC> binary operators:
DC> ~ - string concatenation
DC> ~= - string append
what happens to _?
DC> && || ^^ // - boolean operations
DC> &&= ||= ^^= //=
DC> and or xor err
DC> +& +| +^ << >> - bitwise operations
DC> +&= +|= +^= <<= >>=
i would add the word integer there. they do bitwise math on the integer
part of a scalar value.
DC> ~& ~| ~^ - charwise operations
DC> ~&= ~|= ~^=
and these do bitwise operations but on the string part of a
scalar. charwise isn't the best name for that.
DC> ?& ?| ?^ - [maybe] C-like bool operations
DC> ?&= ?|= ?^= - (result is always just 1 or 0)
hmm.
DC> ~~ !~ - smart match, smart non-match
is that also bind for tr///?
uri
--
Uri Guttman ------ [EMAIL PROTECTED] -------- http://www.stemsystems.com
----- Stem and Perl Development, Systems Architecture, Design and Coding ----
Search or Offer Perl Jobs ---------------------------- http://jobs.perl.org