advice on programming style: is multiple inheritance bad?
stephan.diehlNOSPAM at gmx.net
Tue Feb 3 13:11:37 CET 2004
John Roth wrote:
> And that's one of the conceptual pitfalls. A mathematician would
> look at the behavior of a subclass as having ***less*** functionality
> than the superclass, while in practice subclasses usually have either
> *different* functionality or *more* functionality.
I'd really question your statement here. Take for example the "class" of all
real functions (f:R->R) and then have a look at "smooth" functions and
These "subclasses" have actually **more** functionality (in the sense that
theorems that are true for real functions are also true for smooth
functions while the reverse is not true).
This all hinges, of course, what a "class" is supposed to be. Since nobody
can agree on the definition of OO, math is best left alone as an argument
pro/contra some OO scheme.
Just my 2c
More information about the Python-list