[Zope-dev] ZCA proposal

Martin Aspeli optilude+lists at gmail.com
Thu Dec 3 06:55:25 EST 2009


Martijn Faassen wrote:
> Martin Aspeli wrote:
> [snip]
>> Thinking out loud further, I think I may actually prefer IFoo.instance() 
>> instead of .utility(), but maybe that debate is already passed. 
>> .utility() is OK too.
> 
> Haven't you been one of the people who has maintained that changing the 
> names would do a disservice to everybody?

Yeah, yeah, I was just thinking out loud. :) Calling the lookup method 
"instance" is not really changing the name: you'd still have <utility /> 
to register it etc. It's just the naming of a lookup method, which 
indicates "get me the instance providing this interface". I can see it 
getting confusing, though.

On balance, I think .utility() is better. I'm also not opposed to IFoo() 
for lookup (so long as registration and documentation maintains the 
adapter/utility distinction).

Martin

-- 
Author of `Professional Plone Development`, a book for developers who
want to work with Plone. See http://martinaspeli.net/plone-book



More information about the Zope-Dev mailing list