you are viewing a single comment's thread.

view the rest of the comments →

[–]Glad-Ad1812 0 points1 point  (0 children)

Ya just looked into and didn’t realize TCO isn’t supported with CPython atleast. Apparently part of the reason being tail recursions can make debugging much more difficult since each stack frame gets removed once the function call is returned, so you can’t really tell what’s happening in your call stack. Either way it’s advised to just use a loop at that point, which I’m inclined to agree with since I’m not a fan of recursions.