[Zope3-dev] EventService, references, and subscription semantics
Shane Hathaway
shane@zope.com
Tue, 26 Feb 2002 10:53:49 -0500
Phillip J. Eby wrote:
> Okay, maybe I'm missing something, but it seems to me like the simplest
> decomposition would be:
>
> 1. 'IReferenceable' - interface with a 'getReference()' method, returns
> a reference to the referencable thing.
>
> 2. 'IReference' - subclass of IReferenceable, whose implementations'
> 'getReference()' methods return 'self'. Includes a 'dereference()'
> method, as well as '__eq__()' and '__hash__()' (general comparison
> doesn't really make sense for references, but dictionary lookup and
> equality checking would be useful). 'IReference' objects should be
> immutable and pickle-able, but should probably *not* be Persistent (the
> overhead would be wasteful).
I see where you're going, but I think this is more complex, not simpler.
Any object should be "referenceable", but the name IReferenceable
suggests the need for all referenceable objects to implement
IReferenceable, which I assume you did not intend.
Your URL ideas are good, but it would seem to me those ideas do not
require the "IReferenceable" interface.
Shane