Barry Warsaw wrote:
> Two other things I wanted to mention.  One, I do think adaptation is  
> an important (necessary?) aspect to any interface solution for  
> exactly the reasons you state.  Second, I think the other thing that  
> bugs me about a pure-generics solution is that all the generic  
> functions seem to want to live in a global namespace.  That's fine  
> for len() or iter() or keys(), but not so good for  
> all_nonbouncing_regular_delivery_members().   In that sense, for more  
> domain-specific functionality, it just seems that interfaces (w/ 
> adaptation for that extra level of abstraction) is the object- 
> oriented approach to generics.

Generics can live quite happily inside modules and as methods on objects.

The important aspect is the ability to tell the generic function "here's 
how to frobnicate a doodad", even though the basic frobnicator knows 
nothing about doodads, and doodads know nothing about frobnicating. That 
machinery can be designed to work for any callable.

Cheers,
Nick.

-- 
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---------------------------------------------------------------
             http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to