On Sat, Apr 02, 2005 at 01:49:24AM -0800, Brent 'Dax' Royal-Gordon wrote:
: I've included assignment forms of all operators in the exponentiation,
: multiplicative, additive, junctive, and tight logical levels; this may
: be overkill or underkill. I've not included hyper forms of these
: operators, as I figure they're handled by metaoperators.
I would say that assignment operators are also metaoperators. They're
just a bit picky about which precedence levels they metastasize.
In other words, if someone adds an appropriate binary operator, it
would automatically get the assignment meta-operator. But not if
it's a chaining binary, non-chaining binary, or assignment operator.
(We could define the levels that it *does* work on, but then it doesn't
work on user-defined precedence levels by default. Alternatively,
we could develop a profile apart from precedence levels for operators
that are omitted, such as ones that return boolean values, or that create
new objects, or that mutate their left argument already.)
: In any case, let me know if anything's missing--or for that matter if
: anything's there that shouldn't be.
Seems to be missing:
infix:<?&>
infix:<?|>.
infix:<?^>.
The shifts are all X< rather than X<< to avoid confusion with Texas Quotes.
Oh, and we recently moved => to assignment precedence so it would
more naturally be right associative, and to keep the non-chaining
binaries consistently non-associative. Also lets you say:
key => $x ?? $y :: $z;
plus it moves it closer to the comma that it used to be in Perl 5.
Larry