multiple inheritance super()

Reinhold Birkenfeld reinhold-birkenfeld-nospam at wolke7.net
Thu Jul 28 09:08:43 EDT 2005


Michele Simionato wrote:
>> http://fuhm.org/super-harmful/
> 
> That is a pretty good page; I must say that my position is more radical
> (i.e. it is not super which
> is harmful, it is multiple inheritance itself that it is harmful: was I
> going to design a new language
> I would implement it *without* multiple inheritance).

Multiple inheritance can be very useful if not used in an unresponsible way.

For example, think of mixins. Or compatibility layers. Lately I had to adapt
a wx 2.6 application to wx 2.4 I could either search and substitute $BIGNUM
self.Bind() calls (which isn't done via simple Emacs magic, cause the replacement
varies), or I could write a compatibility mixin and derive every GUI class from
it, too.

Reinhold



More information about the Python-list mailing list