[Python-Dev] Proper tail recursion

Guido van Rossum guido at python.org
Mon Jul 19 19:18:14 CEST 2004

> Given the proposed changes:
> 1) make a seperate eval loop that supports tail calls so as not to
> impact performance of normal programs,
> 2) force tail calls to be explicitly enabled using a run-time function call,
> 3) print a warning in stack traces when tail calls are enabled and used.
> is Guido still -1 on this?

Yes, very strongly against.

I don't like reading code that was written by someone trying to use
tail recursion.  It's the ultimate code obfuscation.

I also haven't seen the use case that requires this and couldn't
easily be fixed by changing the data structure or code slightly.
(Andrew Koenig's theoretical objections don't count as use cases.)

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-Dev mailing list