Re: Overloading function calls

Guido.van.Rossum@cwi.nl
Sat, 28 May 1994 09:37:04 +0200

Tim Peters:
> ( about overloaded operators and functions/methods )
> >
> > Is this a case where making the language _dumber_ would help more people
> > than it hurt? I've hesitated to suggest a concrete alternative because I
> > can't think of a reasonable one that's completely backward compatible.
> > But many of the rules now aren't documented, and it's hard to believe
> > they were all intentional anyway <wink>, so maybe backward compatibility
> > isn't so important here?

Steve Majewski:
> "Coercion rules" is one of the few cases where I would vote to throw
> backward compatability overboard if a better and more consistent
> scheme were proposed. I have not made a whole lot of use of the
> trickier aspects of overloading because of the problem of figuring
> out how coerce works with the special cases of '*' ( for "seq * n"
> or "n * seq" ) and some others. I have a bunch of code that I
> have never posted or released because I could never quite figure
> out how to write coercion rules that were bug free in all cases,
> because I couldn't quite figure out what the rules ARE.

I agree on both fronts: this little dark corner of the language is a
mess, and it should be fixed without (much) regard for backward
compatibility. It will be painful for part of the implementation,
but it has to be done.

I can't promise when I'll do it, but I just thought I'd shortcut the
discussion by agreeing for a change!

--Guido van Rossum, CWI, Amsterdam <Guido.van.Rossum@cwi.nl>
URL: <http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>