[Zope-dev] implementing zope.component 4.0

Godefroid Chapelle gotcha at bubblenet.be
Tue Dec 1 18:06:13 EST 2009


Fred Drake wrote:
> On Tue, Dec 1, 2009 at 11:34 AM, Martin Aspeli <optilude+lists at gmail.com> wrote:
>> I think
>> that logically, these are two different concepts that meet two different
>> sets of use cases.
> 
> Agreed here.  This is essential to this discussion.
> 
> I've been quite surprised that there are so many who argue to unify these ideas.
> 
> 
>   -Fred
> 

Agreed here as well.

I think that the different intentions of

1) lookup by interface in registry and

2) adaptation

will be easier to understand if the code patterns are different as well.



Because I doubt tuple adaptation is that frequent, I am for

> 5) Call the interface for adaption, and something else for utility
> lookup, with tuples for multi-adaptation.

where the something else is 'Interface.getUtility()'.

This way we can

- make the interface more prominent when doing lookups (and have some 
sort of symmetry between lookup and adaptation)

- and simultaneously keep the semantic difference between adaptation and 
lookup.

-- 
Godefroid Chapelle (aka __gotcha) http://bubblenet.be



More information about the Zope-Dev mailing list