[Python-3000] Special methods and interface-based type system
Greg Ewing
greg.ewing at canterbury.ac.nz
Fri Nov 24 01:02:17 CET 2006
Guido van Rossum wrote:
> I fear I will miss the class as a convenient focus for
> related functionality.
I have the same feeling. I get the impression that
generic functions work okay in a language designed
around them from the beginning. But adding them
belatedly to a language built around classes and
methods would give Too Many Ways To Do It.
Another thing I don't like about generic functions
is their comefromish nature. You know that an
implementation of a method for some given type
is going to be defined in one of a few easily-found
places, but an implementation of a generic function
for that type could be anywhere in the program.
Or maybe that's just another way of stating your
"classes as a focus of functionality" argument. In
any case, from a software engineering viewpoint it
seems bad, for the same reasons that monkeypatching
is generally considered undesirable.
--
Greg
More information about the Python-3000
mailing list