Okay, take 4, with 'X' meaning xor, so you can see it in context. I warn ya, I'm gonna keep doing this until there's a "Final" version, for some value of "Final". ;-) Again, I'm wondering if we're going about this wrong way -- perhaps we need to go to more effort to save ^ as xor, and use something different for hypers, like h<+> or h[+] or `+ or ~+ or ~~+, etc?

(I'm just leaving some of the questionable ops in for now, it's easier to take them out later than re-add them for the various iterations.)

unary (prefix) operators:

\ - reference to
* - list flattening
? - force to bool context
! - force to bool context, negate
not - force to bool context, negate
+ - force to numeric context
- - force to numeric context, negate
+X - force to numeric context, complement
~ - force to string context
~X - force to string context, complement
. - method call on current topic

++ - preincrement
-- - predecrement

unary (postfix) operators:

++ - postincrement
-- - postdecrement

... - [maybe] same as ..Inf

other postfix operators:

() - (when operator is expected)
[] - array access
{} - hash access

magical whitespace modifier
_ - remove whitespace/newline

hyperoperators:

^ - as prefix to any unary/binary operator, "vectorizes" the operator

binary operators:

+ - * / % ** x xx ~
+= -= *= /= %= **= x= xx= ~=

< > <= >= == != <=>
lt gt le ge eq ne cmp

&& || XX // - boolean operations
&&= ||= XX= //=
and or xor err

.& .| .X << >> - bitwise operations
.&= .|= .X= <<= >>= - [maybe charwise too]

~& ~| ~X ~< ~> - [maybe] charwise operations
~&= ~|= ~X= ~<= ~>=

?& ?| ?X - [maybe] C-like bool operations
?&= ?|= ?X= - (result is always just 1 or 0)

& | X - superpositional operations
&= |= X= - intersection, union, disjunction
! - [maybe]
all any one none
sum prod cat reduce

~~ !~ - smartmatch, perl5 =~, !~
like unlike - [maybe]

=> - pair creator
, - list creator
; - "greater comma", list-of-lists creator
: - adverbial
. - method call

.. - range
... - [maybe] range, exclusive of endpoint

= - assignment
:= - binding
::= - binding, but more so

trinary operator:

?? :: - if/else

parens, misc, and quotelike operators

()
[] - [when term is expected]
{} - [when term is expected]

m// - shorthand, "matches"
s/// - shorthand, "substitute"
tr/// - shorthand, "transliterate"

'...' "..." `...` /.../ << >>
q qq qx rx qw [qm?]
(+ qr ?)

<...> - readline
(heredocs) - [exact format unknown]


named unary (prefix) operators, terms, and other assorteds, identified
when possible:

-X - [op] filetest operators

temp - [op]
let - [op]
ref - [op]
defined - [op]
undef - [op]
undef - [term]
exists - [op]
delete - [op]
but - [op] val properties

${ } - [deref] dereference scalarref
@{ } - [deref]
%{ } - [deref]
&{ } - [deref]

... - [term] yada**3
Inf - [term]
Nan - [term]

is - [declar] var properties
-> - [declar] like 'sub'
hash - [declar] force hash context


explicit radix specifications for integers:
0123 - decimal
2:0110 - binary [also b:0110?]
8:123 - octal [also o:123?]
16:123 - hex [also h:123?]
256:192.168.1.0 - base 256
(...etc...)


other uncategorized:

my our - [declar]
map grep
sqrt log sin cos tan (etc...) - math
lc lcfirst uc ucfirst
int ord oct hex bin


MikeL

Reply via email to