News for hackers. Stuff that matters.
Re:It Is What It Is (And Nothing Else) – Why Recursion Still... by mafribe on Monday February 22, 2016 @07:56AM (#11150465)
Why is this being down-voted? Could somebody please explain why they think what I wrote is wrong? I'd be happy to learn something new about loops and recursion.
Re:It Is What It Is (And Nothing Else) – Why Recursion Still... by conceit on Monday February 22, 2016 @02:33PM (#11153585)
Wasn't me, but it's probably because iterative loops are believed to be easier to reason about. OTOH the recursive definition for the Fibonacci or factorial numbers seem easier, for one because they map to the literal explanation.
Re:It Is What It Is (And Nothing Else) – Why Recursion Still... by mafribe on Monday February 22, 2016 @03:26PM (#11154002)

    iterative loops are believed to be easier to reason about.
This cannot be the case, because you can translate loops into recursion and vice versa, so every reasoning problem that one finds with loops is also a problem in reasoning about recursion and vice versa. If you look at the Hoare-logic rules this shows up clearly. In both case you need a suitably invariant, and you need a termination argument.
Re:It Is What It Is (And Nothing Else) – Why Recursion Still... by conceit on Tuesday February 23, 2016 @11:01PM (#11164476)
Does the translation come for free? If not, it's probably complicated to reason about.