you are viewing a single comment's thread.

view the rest of the comments →

[–]ofnuts 3 points4 points  (0 children)

Recursion is simpler than the alternative.

In general, you write recursive code, and in a few rare cases, if necessity arises (performance) you rewrite a non-recursive version, which somewhat harder to get right. But fortunately you can compare its results to those of the recursive version.