[Zope3-dev] Re: adaptation based on class rather than interface
Martin Aspeli
optilude at gmx.net
Thu Nov 9 14:45:29 EST 2006
Jean-Marc Orliaguet wrote:
> And there is nothing wrong with using inheritance when there is a '__IS
> A __' type of relation (e.g. an ordered folder IS A folder IS AN item,
> ...), or if there is a HAS_A type of relation (a folder has items, a
> chair has four legs...). It seems that Zope3 has banned all form of
> class inheritance, even those that made sense, and that would have
> simplified the implementation.
That is totally, utterly, patently rubbish. Devise some regular
expression and grep the zope 3 source code for inheritance.
> "marker interfaces" have empty specifications, that's the problem: they
> can't grow into "real" interfaces that have a specification. If you add
> methods to the marker interface you will have to track down all classes
> that implement the interface (unless you don't really care whether
> classes do implement their interface).
Marker interfaces by design serve a different purpose than other
interfaces. They are the equivalent of an on/off switch about object
behaviour or purpose that is externalised from that object (i.e. they
are not just booleans in a schema, they are potentially managed outside
that class).
Martin
More information about the Zope3-dev
mailing list