Since it's been a full month since the start of the monster "operator precedence" thread, here's what I've been able to gather as the revised, new-and-improved list of Perl6 operators, IF we did all the xor/cat/regex-related changes as discussed as of this moment. ;-) I think this list is accurate and complete so far, LMK?
unary (prefix) operators:
\ - reference to
$ - dereference scalarref
@ - dereference arrayref
% - dereference hashref
& - dereference coderef
* - list flattening
? - force to bool context
! - force to bool context, negate
+ - force to numeric context
- - force to numeric context, negate
~ - force to string context
. - method call on current topic
-X - filetest operators
++ - preincrement
-- - predecrement
unary (postfix) operators:
++ - postincrement
-- - postdecrement
other postfix operators:
[] - array access
{} - hash access
hyperoperators:
^ - as prefix to any unary/binary operator, "vectorizes" the operator
binary operators:
+ - * / % ** x ~ << >>
+= -= *= /= %= **= x= ~= <<= >>=
< > <= => == != <=>
lt gt le ge eq ne cmp
&& || !! // - boolean operations
&&= ||= !!= //=
and or xor
.& .| .! - bitwise operations
.&= .|= .!=
& | ! - superpositional
all any one (none?)
~~ !~ - smartmatch and/or perl5 '=~' (?)
like unlike
=> - pair creator
, - list creator
; - "lesser comma", list-of-lists creator
: - adverbial
. - method call
.= - (?)
-> - like 'sub'
.. - range
... - yada**3
= - assignment
:= - binding
::= - binding, but more so
is
but
trinary operators:
?? ::
parens, misc, and quotelike operators:
()
m//
s/// - still around, but maybe shorthand for something else
tr///
'...' "..." `...` /.../
q qq qx qr qw
(heredocs) - (exact format unknown)
named unary (prefix) operators:
my our temp
not ref defined undef
length exists delete
sqrt log sin cos tan
lc lcfirst uc ucfirst
int ord oct hex (bin?)
(...etc...)
MikeL
- Re: perl6 operator precedence table Larry Wall
- Re: perl6 operator precedence table Damian Conway
- RE: perl6 operator precedence table Brent Dax
- Re: perl6 operator precedence table Damian Conway
- Re: perl6 operator precedence table Adam D. Lopresto
- Re: perl6 operator precedence table Damian Conway
- Re: perl6 operator precedence table Joseph F. Ryan
- Re: perl6 operator precedence table Larry Wall
- Re: perl6 operator precedence table Martin D Kealey
- Re: perl6 operator precedence table Larry Wall
- Re: Perl6 Operator List Michael Lazzaro
- Re: Perl6 Operator List Larry Wall
- Re: Perl6 Operator List Austin Hastings
- Re: Perl6 Operator List Michael Lazzaro
- Re: Perl6 Operator List Austin Hastings
- Re: Perl6 Operator List Michael Lazzaro
- Re: Perl6 Operator List Luke Palmer
- Re: Perl6 Operator List Damian Conway
- Re: Perl6 Operator List Larry Wall
- Re: Perl6 Operator List Damian Conway
- RE: Perl6 Operator List Brent Dax