4 ms·
For one it's not handled well by many languages, expensive stack cost, not tail call optimized, max limits on stack, ... It would be nice if you could write rec
by Aardwolf 9y ago
For one it's not handled well by many languages, expensive stack cost, not tail call optimized, max limits on stack, ... It would be nice if you could write recursive algorithms in code and be sure it ran as well and efficient as when you do it manually with for loops and separate stack data structures.
- mahyarm 9y agoNot to mention the debugger. Recursive loops create huge traces that are difficult to follow vs an equivalent for loop.
- icebraining 9y agoThat's a feature, not a bug, in my opinion. Recursion preserves information about the function's execution. The problem is debuggers being too dumb to detect it and present it well.