in reply to Re: Stop reinventing the wheel! (was Re: Directory Recursion)
in thread Directory Recursion
As for ...
To a newer programmer trying to understand directory (or any) recursions, it is a difficult enough task simply trying to comprehend the what, why, and how of it. To be burdoned by the many exceptions, catches, "look out for"'s, and so on.... would be discouraging, to say the least.... that's exactly what programming is all about! Especially with recursion, you must consider things like "will this ever terminate" and "am I looking at the right data" and "what can go wrong". Those cannot be overlooked, simply sweeping them under the rug.
The basics of recursion can be illustrated with something like factorial, which has easily defined end-points and recognizable computations. The flaws of recursion can be illustrated with something like the fibonacci calculator. But even these examples require at least a footnote to say "note that we aren't verifying that the number is an integer here", in my book anyway. Why do you think we have so many footnotes in the llama? I say one sweeping statement in the text, but in the footnote, I'm able to more carefully specify it so that I don't outright lie.