3 ms·
> In the end, anything that can be done with tail recursion can be done in a loop which is way more readable then either using a GOTO or recursion. The real va
by wtetzner 12y ago
> In the end, anything that can be done with tail recursion can be done in a loop which is way more readable then either using a GOTO or recursion.
The real value in TCO isn't a function recurring on itself, it's mutual recursion.
- crimsonalucard 12y agoNo, that is not the only case where it has value. TRO is a mandatory optimization for functional languages where recursion is the only possible looping construct. Haskell, Clojure, Erlang and Lisps rely on it heavily.
- wtetzner 12y agoSorry, I didn't mean it was the only value. It's the value that you get from it that you don't get from having loops.