Carl Mäsak wrote:
The only alternative I can think
of right now would be to disallow even _declaring_ two operators of
different associativity on the same precedence level... but that kind
of strictitude doesn't sound very perlish.

That depends on how you phrase the restriction.  If you phrase it as
"all assoc traits that get applied to operators of equivalent
precedence must have the same value", you're right; it doesn't sound
very perlish.  If you phrase it as "associativity is a feature of the
precedence level, not the operator" and adjust syntax accordingly,
it's very perlish.  The syntax adjustments would go something like
this: remove the 'assoc' trait; let people specify an optional assoc
value when they use the 'looser' or 'tighter' traits; and require code
to look up the operator's precedence in order to modify its
associativity.

--
Jonathan "Dataweaver" Lang

Reply via email to