On Sun, Nov 07, 2004 at 12:40:45PM -0500, Aaron Sherman wrote:
: I would like to suggest that we define:
: 
:       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.

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

Reply via email to