On Sat, May 2, 2009 at 2:27 PM, John Graham
Hi all
It was suggested I post this idea to the python-ideas list. I apologize in advance for its length, I tried to be thorough :)
Recently there's been some debate over the Tail-Call-Optimization and its use in Python. Some advocates coming from languages that support this optimization say that it makes recursive code far more efficient,
Premature optimization, irrelevant.
and indeed allows some things to happen that could not otherwise occur without running out of stack space.
Use a trampoline. It's the same thing you propose, only it uses existing syntax. It's got a few rough edges, but they're quite manageable, and in no way justify the vast bikeshed this issue has garnered. -- Adam Olsen, aka Rhamphoryncus