Remove multiple inheritance in Python 3000
Diez B. Roggisch
deets at nospam.web.de
Tue Apr 22 11:10:00 EDT 2008
> I have a couple issues with this, though I wholeheartedly agree with
> the sentiment:
>
> 1. Java didn't grow interfaces, they were there from the start.
I might have expressed myself wrong here - I should have written "needed
to introduce interfaces (right from the start)"
> 2. Java interfaces solve a different problem than MI (used properly)
> does: interfaces are there to make types polymorphic, whereas
> inheritance's main use is to share behavior.
But the *goal* of the polymorphy is mainly to have shared behavior. And
matter of factly e.g. in swing, you use inner classes that implement
most of the behavior you want, and override the few points where you
want differences - and then clumsily delegate to that inner class all
your interface-methods.
Diez
More information about the Python-list
mailing list