[Zope3-dev] Re: Container interface issues

Shane Hathaway shane at zope.com
Wed Sep 17 10:12:28 EDT 2003


Martijn Faassen wrote:
> Garrett Smith wrote:
> 
>>Jim Fulton wrote:
>>
>>>Garrett Smith wrote:
>>>
>>>>I personally would not be comfortable with zapi.add because of its 
>>>>opacity.
>>>
>>>It's not opaque, as it is effectively a macro for:
>>> zapi.getAdapter(container, IAddTarget).addObject(name, object)
>>
>>Ah, I officially retract all of my previous griping ;-)
> 
> 
> Hm, it makes me wish there were a shorter way to spell this
> in the first place.
> 
> IAddTarget(container).addObject(name, object)

Obviously it's not open for discussion in this context, but maybe in an 
alternate universe you could spell it like this:

container.IAddTarget::addObject(name, object)

The idea is that adapters are so common that they become a part of the 
language.  Objects no longer have a finite namespace of methods and 
attributes.  The language becomes more organic and polymorphic than ever 
before.  (It could also develop whole new classes of bugs, so I'm not 
entirely certain it would be a *good* idea. ;-) )

Shane




More information about the Zope3-dev mailing list