[Python-3000] PEP 3100 Comments
Phillip J. Eby
pje at telecommunity.com
Wed May 10 19:50:53 CEST 2006
At 10:12 AM 5/10/2006 -0700, Bill Janssen wrote:
> > >> this approach doesn't do anything beyond what Java does
> > >
> > >Actually, it does. It lets you inherit behavior, as well as interfaces.
> >
> > It only lets you inherit behaviour to new subclasses
>
>Not that it matters, but...
Clearly it doesn't matter to *you*. It does matter to me.
>Yes, that's right. In systems like
>these, that's how you "add functionality to already existing classes";
>you mix them with the new functionality into a new type.
Which makes them inferior to existing adaptation systems for Python, which
in turn are inferior to generic functions.
When I say that thing A is "inferior" to thing B, I mean that B can do
whatever A can, but A cannot be used to do things that B can. By that
definition, using inheritance to denote behavior availability is markedly
inferior to the other alternatives.
More information about the Python-3000
mailing list