News for hackers. Stuff that matters.
Re:Dijkstra was right – recursion should not be difficult by unclebucknasty on Monday August 07, 2017 @03:34PM (#14950523)
Well, I wasn't offering an opinion as to when recursion should be used--merely pointing out that the GP's proposed change didn't hold the same meaning as the original.

>never unless you happen to have unbounded call stack depth.

But, since you mention it, I'd have to disagree with your assertion. It's not just about call stack-depth or artificial limitations. There are plenty of use-cases wherein the search-space-depth itself is naturally bound, but unknown/variable down any particular path (e.g. category hierarchies). And, yes, we can impose reasonable "manual" limitations on still more use-cases to expand this universe even further.

Using recursion in these cases is far more elegant than nested loops.

Re:Dijkstra was right – recursion should not be difficult by AstralStorm on Monday August 07, 2017 @05:05PM (#14951259)
That falls under "proved it cannot happen with a formal proof". If you didn't actually prove it you're playing with fire.

Funny thing is that proofs over recursive functions are either very easy or terribly involved.

Also it is a false dichotomy. Nested loops are not the only option.