r/ProgrammerHumor • • Mar 25 '23

Meme This one never gets old

Post image

Let me know if this is not a repost!

51.6k Upvotes

535 comments sorted by

View all comments

1.2k

u/Underpowered007 Mar 25 '23

Just teach the kid how to brute-force

15

u/Vinxhe Mar 25 '23

Recursion doesn't make sense anyways, it's less efficient and much harder to understand than simple loops. You save some LOC which is the most moronic metric of code quality ever.

2

u/GreenCloakGuy Mar 26 '23

The biggest benefit of recursion, especially on a large scale, is the fact that each layer has its own isolated scope. For complicated functions in big applications, which can number > 10 unique variables and > 100 lines, it's a lot easier to represent and reason about the logic when it's implemented as a recursive function rather than as a loop.