It obfuscates the code and impedes debugging.
Its slower and has to rely on compiler optimizations.
I've rewritten many such recursive functions and there always was a speedup and a better looking code.
Name:
Anonymous2013-09-22 11:50
In some cases it's faster and reads better. Rarely though.
Name:
Anonymous2013-09-22 11:54
Please post some comparisons, I find loops to come out bad.
Recursion is fine and very useful.
However, recursion just for the sake of using recursion is something first years do to "impress" their professors.
Name:
Anonymous2013-09-23 2:23
Recursion can be a very useful tool in solving some problems (recursive backtrack algorithms come to mind). For most problems involving iteration though, use a higher order function if it can be applicable.
Name:
Anonymous2013-09-23 2:58
I love organizing code in terms of recursion rather than iterative loops.