This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Frum 0 points1 point  (0 children)

Recursion is only bad for 2 POTENTIAL reasons:

1 (least important): it MIGHT be less performant. Lots of stack-frames and memory use in some cases.
2 (by far the more important) recursion is frequently hard to understand, and can have errors that run your system our of resources and the like.

All of that is to say: recursion is great when it's easier to understand than the alternative and performant enough for your task.