11

Possible Duplicate:
Recursion or Iteration?

To iterate is human, to recurse divine. - L. Peter Deutsch

Why do people favor recursion over iteration, and even go so far as to call it divine, as shown in the quote? It seems to be over-hyped. As far as I can tell, recursive code is more difficult to grasp, and therefore maintain. Additionally, you run the risk of stack overflows if the compiler doesn't optimize.

Community
  • 1
  • 1
Maxpm
  • 24,113
  • 33
  • 111
  • 170
  • 1
    @gnovice Possibly duplicate of *all* of these http://stackoverflow.com/search?q=recursion+vs+iteration haha – Swift Jun 24 '11 at 04:25

0 Answers0