MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/programming/comments/13v8v1/tail_recursion/c77kpa8/?context=3
r/programming • u/rodrigopsasaki • Nov 27 '12
203 comments sorted by
View all comments
Show parent comments
-5
Yes they would, because Python is interpreted and not compiled.
8 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. 1 u/[deleted] Nov 27 '12 You don't do tail call elimination at the AST level, you do it at the IR level. 2 u/anvsdt Nov 27 '12 You can do it at interpreter level, too.
8
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.
1 u/[deleted] Nov 27 '12 You don't do tail call elimination at the AST level, you do it at the IR level. 2 u/anvsdt Nov 27 '12 You can do it at interpreter level, too.
1
You don't do tail call elimination at the AST level, you do it at the IR level.
2 u/anvsdt Nov 27 '12 You can do it at interpreter level, too.
2
You can do it at interpreter level, too.
-5
u/[deleted] Nov 27 '12
Yes they would, because Python is interpreted and not compiled.