[Python-3000] pep 3124 plans
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun Jul 22 03:28:27 CEST 2007
Phillip J. Eby wrote:
> Well, I've worked with people who dislike OO for exactly the same
> reason, since they feel they can never know whether a method might
> have been overridden in a subclass.
I think there's a considerable difference in degree here,
though. When you call a method, you know you're delegating
responsibility to the object for carrying out that operation.
And you know you're delegating it to that object and no
other, so given the run-time type you can find the code
that gets called fairly easily.
With GFs that require overloadable functions to be declared
as such, you know when you call one that you're delegating
to something. But it's a lot less clear what you're
delegating to or where. Any or all of the arguments could
be determining which piece of code gets called, and the
code could be in a much wider variety of places, not
necessarily even near any of the classes involved.
If any function can be overloaded, then *any* call could
potentially be delegating somewhere, increasing the range
of possible behaviours even more.
--
Greg
More information about the Python-3000
mailing list