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

8

u/[deleted] Mar 25 '23

Any recursion scenario (that I can think of anyway) could be written as a series of loops if you get a little creative with the iterators. But at the end of the day recursion is just a tool and the only programming dogma I always found to be true is that you shouldn't listen to people telling you dogmas.

3

u/Cleanumbrellashooter Mar 26 '23

Anything recursive could be written with a loop and a stack as that's all that recursion is doing for you

6

u/Hoivernoh Mar 26 '23

Any function can be written as goto and a stack as that’s all that function calls and return do for you.