|
|
|
|
|
by whichdan
4270 days ago
|
|
I would argue that recursion is very important. Could you elaborate on what makes it bad practice? Sure, in languages without tail-call optimization, using it instead of a loop will incur more overhead, but certain problems (like traversing directories in a filesystem, nodes in an XML document, or any tree structure) are impossible to implement otherwise. Do you have a specific scenario in mind where recursion was a poor solution to your problem? |
|