News for hackers. Stuff that matters.
Re:What Is Recursion? [pdf] by IIAOPSW on Monday March 13, 2023 @05:29AM (#35133213)
Re:What Is Recursion? [pdf] by tromp on Monday March 13, 2023 @07:47AM (#35134339)
> First, then, a not-too-serious dictionary definition:

> Recursion (rĭ-kûr’-zhən) noun. See recursion.

I like this version:

To understand recursion, you must first understand recursion.

I also like self-referential music, such as Carly Simon's "You're so vain"

> You probably think this song is about you

Re:What Is Recursion? [pdf] by baruchel on Monday March 13, 2023 @01:53PM (#35139625)
You can find such an entry for "recursion" at the index page in Kernighan & Ritchie: https://social.wildeboer.net/@jwildeboer/103509861237806820
Re:What Is Recursion? [pdf] by chaorace on Monday March 13, 2023 @08:35AM (#35134853)
Recursion is recursion, obviously.
Re:What Is Recursion? [pdf] by Koshkin on Monday March 13, 2023 @12:48PM (#35138379)
I find that recursion is something that in simple cases can be replaced with a loop, and in complex cases is hard to reason about and therefore should be avoided.
Re:What Is Recursion? [pdf] by nh23423fefe on Monday March 13, 2023 @03:24PM (#35141074)
What makes a case complex?
Re:What Is Recursion? [pdf] by Koshkin on Monday March 13, 2023 @05:34PM (#35143124)
An indirect recursion.
Re:What Is Recursion? [pdf] by IIAOPSW on Monday March 13, 2023 @05:48PM (#35143345)
Recursion is just spiral reasoning. It looks like circular reasoning, but if you keep going with it the curve keeps getting smaller until eventually you reach the trivial case.
Re:What Is Recursion? [pdf] by kian on Monday March 13, 2023 @09:35PM (#35146134)
Honestly, this is the best single-line definition for a non-specialist I have ever seen.
Re:What Is Recursion? [pdf] by IIAOPSW on Monday March 13, 2023 @10:05PM (#35146391)
How many single line definitions for non-specialists have you seen?
Re:What Is Recursion? [pdf] by kian on Monday March 13, 2023 @10:19PM (#35146504)
I have myself tried to explain recursion many times to those who do not understand it. While I do well, this is significantly more succinct than what it would take for me to succeed with most, and provides a clear visual. Nicely done.

I’ll probably be stealing that metaphor.

Re:What Is Recursion? [pdf] by IIAOPSW on Monday March 13, 2023 @10:50PM (#35146762)
Please, credit it to Euler.
Re:What Is Recursion? [pdf] by stev-0 on Tuesday March 14, 2023 @02:38AM (#35148100)
I don’t think recursion is that hard to reason about. You need an understanding of how to work with it. This requires practice in the same way dealing with trigonometry required that.

If you are a programmer and feel that dealing with recursion is hard I think you’ve got an opportunity for growth there.

It’s true that recursion is harder to deal with than loops. I generally use loops and recursion for a different class of problems.

Working with trees of arbitrary depth is much easier when using recursion.

Re:What Is Recursion? [pdf] by schwartzworld on Tuesday March 14, 2023 @02:27PM (#35156240)
Unless you are working in a functional language and don't have loops.
Re:What Is Recursion? [pdf] by NtG_UK on Monday March 13, 2023 @07:33PM (#35144825)
Was fully expecting this PDF to be a one-line reference to itself.
Re:What Is Recursion? [pdf] by omidHeravi on Wednesday March 15, 2023 @05:37PM (#35175074)
What is the name of the actual book?
Re:What Is Recursion? [pdf] by yamrzou on Wednesday March 15, 2023 @08:37PM (#35176677)
The Recursive Mind by Michael C. Corballis.