[Python-Dev] Proper tail recursion

Jeremy Hylton jhylton at gmail.com
Thu Jul 15 14:35:57 CEST 2004

On Wed, 14 Jul 2004 18:36:16 -0700, Guido van Rossum <guido at python.org> wrote:
> I'm not interested in adding this to the official Python release.
> One reason is that if an exception happens in such a tail-recursive
> call, the stack trace will be confusing.
> Another reason is that I don't think it's a good idea to try to
> encourage a Scheme-ish "solve everything with recursion" programming
> style in Python.
> But feel free to maintain this as an independent modification, a la
> Stackless -- I'm sure there are people who would like to try this
> out.

It would be pretty interesting to create a Python-fork project that
combined all sorts of different ideas for a Python implementation:
Stackless + tagged integers + tail recursion.  There's more value to
having an actual SF project with its own CVS repository than to having
a collection of patches on various web pages.  We'd have more people
trying the changes and have a better chance of understanding their
effects (performance, stability, readability, &c).  Maybe we'll find
that some of the ideas would be good for Python.

I like Python-fork as the name; it captures the experimental nature for me.


More information about the Python-Dev mailing list