On Dec 2, 2009, at 8:58 AM, Fred Drake wrote:

> On Wed, Dec 2, 2009 at 8:42 AM, Gary Poster <gary.pos...@gmail.com> wrote:
>> You are arguing for the unification of utilities and adapters?
> 
> No.  I'm arguing not to conflate utilities with the singleton pattern
> or adaptation with ownership of the resulting adaptation.

OK.

I have given up on the singleton presentation.  I still think that it has as 
much validity as comparing adaptation to type casting, but let's leave it.  
It's dead.

The "ownership" issue is just a small part of the larger picture that I address 
below.

On Dec 2, 2009, at 9:19 AM, Thomas Lotze wrote:
> I think the difference between these two perspectives may have to do with
> why some people in this discussion confuse (as I see it) the concepts of
> instance vs. factory registration and adapter vs. utility lookup.

It's not a matter of confusion in my mind.

It's a matter of trying to present these ideas in a way that people who do not 
use these ideas frequently understand and remember easily.

I think the difference is between the perspective of people who use these tools 
day in and out, and are already comfortable with them; and the perspective of 
people who want to make the ideas easy to use and remember for introductory and 
casual/intermittent usage.

If Python presented classes as abstract callables that can do whatever the heck 
you want, I don't think that would be particularly useful.  That's what they 
are, but we mostly use them as factories.  They are generally explained as 
factories.  The exceptions are that: unusual exceptions to the rule and basic 
idea.

Instance vs. factory registration is a clean way of distinguishing between 
"utilities" and "adapters".  "adapters" is IMO not an accurate description of 
how we use "multiadapters" (and certainly not "subscription adapters," which is 
another whole ball of wax that has a different solution IMO).

Without this distinction, AFAICT either you want to conflate the ideas, or you 
have a concept of the differences between the two that is more esoteric than I 
think is useful.  I get the impression that it is on the second point of those 
that we disagree.

Gary

_______________________________________________
Zope-Dev maillist  -  Zope-Dev@zope.org
https://mail.zope.org/mailman/listinfo/zope-dev
**  No cross posts or HTML encoding!  **
(Related lists - 
 https://mail.zope.org/mailman/listinfo/zope-announce
 https://mail.zope.org/mailman/listinfo/zope )

Reply via email to