Larry Wall |Perl 6| wrote:
Indeed, getting "close enough" is one of the underlying design themes
of Perl 6.  As to whether we're close to do the operator aliasing in
a mostly digraphic fashion, I'm not sure.  Currently a macro for an
infix would be given the AST of the left argument to play with, and
the opportunity to influence the parse of its right argument.  This is
overkill for a mere alias.  We may need to distingish single-token
substitution macros from macros that govern the ASTs around them in
order to make such operator canonicalization painless, I think.

Yes. A context-sensitive (e.g. infix) token-for-token exchange that is easily defined as such without letting the user get into too much trouble. If the operator names can read this table too, then it won't matter which is the "real" one. Someone can declare an overloaded operator with either name, as well as call it with either name.

Reply via email to