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. _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
