[Python-3000] Sane transitive adaptation
Phillip J. Eby
pje at telecommunity.com
Sat Apr 8 09:37:01 CEST 2006
At 02:21 PM 4/8/2006 +1000, Nick Coghlan wrote:
>>>Further, if all builtin function
>>>objects (including C function descriptors and method wrappers) were
>>>potentially generic,
>>This seems a rather extreme anticipation. I don't think anybody has
>>assumed this is where we might be going.
>
>There's certain attractive properties to doing it though - if we can get
>it down to the point where the runtime hit is minimal for non-extended
>functions, then it avoids the scenario "if only framework X had made
>function Y extensible, the fixing this would be easy!".
Right, this is why I'm so obssessed about the performance - to ensure that
the mechanism *can* be ubiquitous, and therefore will get used in
preference to explicit type checks and just plain lack of extensibility.
In today's CPython, you can manage this "delayed overloading" by swapping
out func_code, but a uniform, higher-level mechanism would be more
desirable, especially one that includes alternative Python implementations.
More information about the Python-3000
mailing list