[Python-Dev] type categories
Oren Tirosh
oren-py-d@hishome.net
Sat, 24 Aug 2002 20:06:31 +0300
On Sat, Aug 24, 2002 at 05:37:36PM +0200, Alex Martelli wrote:
> On Saturday 24 August 2002 05:15 pm, Jeremy Hylton wrote:
> > Good point, Oren. We now have two requirements for interfaces that
> > are different than the standard inheritance mechanism. It should be
> > possible to:
> >
> > - inherit from a class without implementing that class's interfaces
> >
> > - declare that a class implements an interface outside the class
> > statement
> >
> > It's harder to support the second requirement using the current
> > inheritance mechanism.
>
> The second requirement is a good part of what adaptation is meant
> to do.
I am not talking about situations where the object does not meet your
expectations and needs to be adapted - I'm talking about situations where
it actually does and the only problem is how to describe that fact
properly.
Adaptation is cool, but I don't see it as a replacement for anything that
interfaces are supposed to achieve. Effective adaptation requires some
kind of interface definition mechanism to work on top of.
Oren