Iterative vs. Recursive coding

Navkirat Singh navkirats at gmail.com
Fri Aug 20 10:24:30 CEST 2010


On 20-Aug-2010, at 1:17 PM, News123 wrote:

> On 08/20/2010 02:26 AM, Steven D'Aprano wrote:
>> On Thu, 19 Aug 2010 22:00:16 +0000, Martin Gregorie wrote:
>> 
>>> Recursion can be quite a trick to get your mind round at first
>> 
>> Really? Do people actually find the *concept* of recursion to be tricky?
> Is this a sincere surprise or are you just boasting?
>> 
>> If I remember correctly, my puzzlement about recursion lasted about 15 
>> seconds. I remember thinking "How does the function foo know that there 
>> is a function foo when foo doesn't fully exist yet?", but once I accepted 
>> the fact that it just does it all just seemed obvious. Getting recursion 
>> *right* is sometimes tricky, but the idea itself isn't.
> 
> Well there's two things where I remember, that at least quite some
> people in our class (at least the ones who didn't do maths or
> programming in their spare time) had problems with.
> 
> This were recursion and Mathematical induction. (quite the same though)
> 
> The fact, that you didn't have the issue doens't mean it's easy for others.
> 
> 
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list

Well I guess why you did not have a problem understanding recursion is because you took for granted that it is the way it is. 
Most people, like me, try to reason why something is the way it is ! Hence, the delay in understanding the concept fully. 




More information about the Python-list mailing list