[Python-Dev] PEP 246: let's reset

Phillip J. Eby pje at telecommunity.com
Mon Jan 17 19:42:54 CET 2005


At 10:21 AM 1/17/05 -0800, Guido van Rossum wrote:
> > Heh.  As long as you're going to continue the electrical metaphor, why not
> > just call them transformers and appliances?
>
>Please don't. Transformer is commonly used in all sorts of contexts.
>But appliances applies mostly to kitchenware and the occasional
>marketing term for cheap computers.
>
>The electrical metaphor is cute, but doesn't cut it IMO. Adapter,
>converter and transformer all sound to me like they imply an "as a"
>relationship rather than "has a". The "has a" kind feels more like a
>power tool to me.

By the way, another use case for type declarations supporting dynamic 
"as-a" adapters...

Chandler's data model has a notion of "kinds" that a single object can be, 
like Email, Appointment, etc.  A single object can be of multiple kinds, 
sort of like per-instance multiple-inheritance.  Which means that passing 
the same object to routines taking different types would "do the right 
thing" with such an object if they adapted to the desired kind, and if such 
adaptation removed the existing kind-adapter and replaced it with the 
destination kind-adapter.  So, there's an underlying object that just 
represents the identity, and then everything else is "as-a" adaptation.



More information about the Python-Dev mailing list