r/ProgrammingLanguages • • Jan 18 '26

Why not tail recursion?

In the perennial discussions of recursion in various subreddits, people often point out that it can be dangerous if your language doesn't support tail recursion and you blow up your stack. As an FP guy, I'm used to tail recursion being the norm. So for languages that don't support it, what are the reasons? Does it introduce problems? Difficult to implement? Philosophical reasons? Interact badly with other feathers?

Why is it not more widely used in other than FP languages?

76 Upvotes

117 comments sorted by

View all comments

Show parent comment

1

u/XDracam Jan 30 '26

Fascinating but what does any of this have to do with tail recursion or my comment?

1

u/SnooRadishes7563 Feb 12 '26

Tail call recursion violates the rules of the call stack. It allows a function to hide from backtraces, debugging, and security tools.

1

u/XDracam Feb 12 '26

Tail recursive functions are just loops written in a different way. And now?