3 ms·
:-) If you've written a while loop you've used recursion. Not saying you need to understand the inner beauty of a fixed point combinator . . . it's just there
by earleybird 5y ago
:-) If you've written a while loop you've used recursion. Not saying you need to understand the inner beauty of a fixed point combinator . . . it's just there, to be noticed, if you choose. You might (meaning if it caught your eye) study some recursion and notice some properties that give you some insight into how your algorithm performs or how induction over your datatypes works. Often when writing some Scheme or Julia, I'll carry a mental model in C at the same time.
What I enjoy about code is that I can understand it on a number of levels.
- AnimalMuppet 5y agoA while loop is only "recursion with tail-call optimization". It's not equivalent to "recursion without TCO". But "while (true)" is also equivalent to a goto :-) While both of those are true, I'm not sure that understanding either of them is relevant to dmitrigr's claim that you have to understand both recursion and pointers in order to amount to anything as a programmer.
- earleybird 5y agoYou are of course correct and with respect to the claim "you can't be a good programmer without understanding indirection and recursion" I don't believe that holds water. I think different techniques allow for a deeper understanding; whether or not that deeper understanding translates to a "better programmer" is fairly subjective. For me, a good programmer is one who writes readable/understandable code and that's a different category all together.