[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Curl, multiple inheritance, and interfaces (was Re: cheerful static typing)
Date: Fri, 11 Jan 2002 16:30:47 -0500
From: "Christopher Barber" <firstname.lastname@example.org>
All this is true, but think of the case in which you do not have the ability
to add an "implements" clause to a class because it lives in a 3rd party
library which you not allowed to change.
Well, I'm not sure it's "right" to pick up a class from a 3rd party
library, and "retroactively" declare that it implements an interface.
It seems that its the prerogative of whoever controls the source code
of the class to decide what interfaces the class should proclaim that
The alternative is to make your own class, have it proclaim that it
implements the interface, and then make its implemention draw upon the
implementation of that class from the 3rd party library, using
inheritance-of-implementation or delegation or whatever convenient
means is at hand depending on the language.