News for hackers. Stuff that matters.
Re:Thinking About Recursion by gliese1337 on Monday February 10, 2020 @02:27PM (#22292326)
You really need language support to make recursion the best practical solution for most problems. However, even when working in "normal" languages like C#, I find that recursion has utility in designing solutions--it is often easiest to find a provably-correct solution for an inherently recursive problem by actually designing a recursive algorithm; you merely then have to perform some compiler work yourself to transform that initial design into an efficient iterative implementation.
Re:Thinking About Recursion by herbstein on Monday February 10, 2020 @03:07PM (#22292700)
In some cases in C# you can write a tail-recursive function and then have Resharper rewrite it into a loop for you.