multi sub *infix:+(...) {...}
Will always generate a warning (not just for C<infix:+>, but for any
operator) if used outside of a class definition or if used inside a
class definition where the current class does not appear in the list of
parameters.
That is, you get a warning if you try to overload the behavior of an
operator for everyone without limiting your change to the type you are
currently defining.
--
アロン <a...@ajs.com>
I suspect that's overkill, and we shouldn't put in a warning until it's
proven to be a problem.
Besides, that'd warn on most of the built-ins. :-)
: That is, you get a warning if you try to overload the behavior of an
: operator for everyone without limiting your change to the type you are
: currently defining.
I also suspect that the presence of the * there already indicates
that the programmer isn't interested in the warning. Catching exact
collisions and ties still happens, so I'm not sure if we need more.
Larry