[Zope3-dev] EventService, references, and subscription semantics

Steve Alexander steve@cat-box.net
Tue, 26 Feb 2002 16:02:58 +0000


Shane Hathaway wrote:
> 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.

So, how about IManagesOwnReference instead of IReferenceable ?

--
Steve Alexander