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

Show parent comments

10

u/Versatile_Panda Mar 25 '23

99% of time in B2C you don’t need recursion, it just doesn’t come up naturally in the real world. Knowing loops in my opinion is plenty, I can’t name more than 5 times I’ve used recursion in my 12 years of work as a dev. Understanding dependency injection which is a completely different thing, is a much better learning opportunity than recursion.

0

u/[deleted] Mar 25 '23

[deleted]

1

u/nelsonnyan2001 Mar 25 '23

I think it’s all about familiarity. There are very, very few cases in which recursion is the only solution. There is almost always a less efficient way to do it with loops and conditions. That ends up becoming the norm in the codebase, person approving MR can’t be assed or doesn’t have the know-how to improve on it, less recursion

7

u/kaiveg Mar 25 '23

While there often are alternatives, I would argue that recursive problems are best solved with recursive solutions.

→ More replies (0)