Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Programmers like recursion because some algorithms are much, much more pleasant to write this way. Others are easier to write iteratively. Both are easy to do wrong.

Example: depth-first tree walking algorithms. Implicit stack makes it trivial to express as recursion.

It is not smart, or special, or something.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: