Okay, For those of you playing the home game, Take 5, with Damian &
Larry's latest inputs. ^ means xor again, and a few things have been
removed. Comments?
Note that I will next post a list of hyperoperators _separately_.
If the design team could take a look, esp. at the remaining questions,
in order to [APPROVE] a "final" list, that'd be wonderful. We'll then
get to work on reconstructing the operator precedence table that
started this monster thread and, hopefully, we can [APPROVE] that in
short order as well, and be done with it. (optimist optimist optimist
optimist...)
hyperoperators:
[op] - as prefix to any unary/binary operator, "vectorizes" the
operator
(is whitespace allowed inside the brackets, e.g. [ + ] vs. [+] ?)
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
+^ - force to numeric context, complement
~ - force to string context
~^ - force to string context, complement
. - method call on current topic
++ - preincrement
-- - predecrement
unary (postfix) operators:
++ - postincrement
-- - postdecrement
... - [maybe] same as ..Inf [Damian votes Yes]
other postfix operators:
() - (when operator is expected)
[] - array access
{} - hash access
binary operators:
(do more of these have possible +~? prefix modifiers,
or only the boolean &|^ ops?)
+ - * / % ** x xx ~ - arithmetic
+= -= *= /= %= **= x= xx= ~=
< > <= >= == != <=> - comparision
lt gt le ge eq ne cmp
&& || ^^ // - boolean operations
&&= ||= ^^= //=
and or xor err
.& .| .^ << >> - bitwise (integer)
operations
.&= .|= .^= <<= >>=
~& ~| ~^ - charwise (string) operations
~&= ~|= ~^=
?& ?| ?^ - [maybe] C-like bool operations
?&= ?|= ?^= - (result is always just 1 or 0)
& | ^ - superpositional operations
&= |= ^= - conjunctive, disjunctive, exclusive
all any one none - conj, disj, excl, dismissive
sum prod cat reduce - [maybe]
~~ !~ - smart match, smart non-match
like unlike - [maybe] [Damian votes No]
=> - pair creator
, - list creator
; - "greater comma", list-of-lists creator
: - adverbial
. - method call
.. - range
... - [maybe] range, exclusive of endpoint [Damian votes No]
= - 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 important assorteds,
identified
when possible:
-X [-X] - [op] filetest operators
ref [ref] - [op]
exists [exists] - [op]
delete [delete] - [op]
defined [defined] - [op]
undef [undef] - [op]
undef - [term]
temp ? - [op]
let ? - [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
--- taken out, for now ----
magical whitespace modifier
_ - [maybe] remove whitespace/newline
(briefly discussed, but not an operator?)
explicit radix specifications for integers:
(we'll just handle this issue separately, OK?)
other uncategorized:
(no decisions are implied about these, e.g. are they
ops, listops, methods, whatever... decide later)
my our - [declar]
map grep
sqrt log sin cos tan (etc...) - math
lc lcfirst uc ucfirst
int ord oct hex bin
MikeL
- Re: [RFC] Perl6 Operator List, Take 5 Michael Lazzaro
- Re: [RFC] Perl6 Operator List, Take 5 Larry Wall
- Re: [RFC] Perl6 Operator List, Take 5 Michael Lazzaro
- Re: [RFC] Perl6 Operator List, Take 5 Simon Cozens
- Re: [RFC] Perl6 Operator List, Take 5 Angel Faus
- Re: [RFC] Perl6 Operator List, Take 5 Graham Barr
- Re: [RFC] Perl6 Operator List, Take 5 Damian Conway
- Re: [RFC] Perl6 Operator List, Take 5 Michael Lazzaro
- Re: [RFC] Perl6 Operator List, Take 5 Damian Conway
- Re: [RFC] Perl6 Operator List, Take 5 Peter Haworth
- Re: [RFC] Perl6 Operator List, Take ... Michael Lazzaro