[Python-Dev] Proper tail recursion (original) (raw)

Chris King colanderman at gmail.com
Mon Jul 19 19:14:55 CEST 2004


On Mon, 19 Jul 2004 13:06:59 -0400, Phillip J. Eby <pje at telecommunity.com> wrote:

At 12:27 PM 7/19/04 -0400, Chris King wrote: >Given the proposed changes: > >1) make a seperate eval loop that supports tail calls so as not to >impact performance of normal programs,

Um, no. Please look at ceval.c before you even consider proposing something like that, and then be sure to have a proposal for how you'd maintain this second eval loop.

I've spent a good deal of time in ceval.c implementing my previous proposal, and an #include and some #defines should do the trick. Result: only one function to maintain, living in a seperate file. Yes, I realize that's a roundabout way of doing stuff, but even projects as closely related to Python as numarray use much more drastic measures to automate code duplication (hint: the C preprocessor wasn't enough for numarray).



More information about the Python-Dev mailing list