Actually TCO is not implemented in the majority of the mainstream languages, so I avoid recursion by all means. Hopefully things will change now that Java and C# are adding FP goodies.
You can do hacks like these in dynamic languages but you'll not convince a lot of ppl to adopt them.
I continue to use recursion where it's difficult to implement an algorithm without (lots of tree structures come to mind), or where unrolling the recursion makes it harder to understand. So long as it isn't too deep it's fine.
Actually TCO is not implemented in the majority of the mainstream languages, so I avoid recursion by all means. Hopefully things will change now that Java and C# are adding FP goodies.
You can do hacks like these in dynamic languages but you'll not convince a lot of ppl to adopt them.
I continue to use recursion where it's difficult to implement an algorithm without (lots of tree structures come to mind), or where unrolling the recursion makes it harder to understand. So long as it isn't too deep it's fine.
Ah yes, if the amount of data is pretty deterministic and small and the iterative version is too cumberstone I do the same.