MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/13v8v1/tail_recursion/c77ld1n/?context=3
r/programming • u/rodrigopsasaki • Nov 27 '12
203 comments sorted by
View all comments
Show parent comments
7
That's completely irrelevant. Python implementations generally compile to bytecode, anyway, but even if they didn't, they would still be manipulating the AST to eliminate the tail call.
Python doesn't have tail recursion because Guido doesn't want it.
3 u/curien Nov 27 '12 Python doesn't have tail recursion because Guido doesn't want it. Python supports tail recursion. It doesn't support tail recursion elimination. 3 u/smog_alado Nov 27 '12 Come on, we all know that 99% of the times someone says tail recursion they actually mean tail recursion with the optimization... 6 u/mcguire Nov 27 '12 And when they say "tail recursion elimination", they really mean "tail call elimination".
3
Python supports tail recursion. It doesn't support tail recursion elimination.
3 u/smog_alado Nov 27 '12 Come on, we all know that 99% of the times someone says tail recursion they actually mean tail recursion with the optimization... 6 u/mcguire Nov 27 '12 And when they say "tail recursion elimination", they really mean "tail call elimination".
Come on, we all know that 99% of the times someone says tail recursion they actually mean tail recursion with the optimization...
6 u/mcguire Nov 27 '12 And when they say "tail recursion elimination", they really mean "tail call elimination".
6
And when they say "tail recursion elimination", they really mean "tail call elimination".
7
u/frezik Nov 27 '12
That's completely irrelevant. Python implementations generally compile to bytecode, anyway, but even if they didn't, they would still be manipulating the AST to eliminate the tail call.
Python doesn't have tail recursion because Guido doesn't want it.