[Tutor] Recursion always returns None

Joel Goldstick joel.goldstick at gmail.com
Tue Aug 28 23:35:02 CEST 2012


On Tue, Aug 28, 2012 at 5:14 PM, Alan Gauld <alan.gauld at btinternet.com> wrote:
> On 28/08/12 17:34, Steve Willoughby wrote:
>>>>
>>>>
>>> For some reason some beginners seem to find recursion a natural pattern.
>>
>>
>> There is a certain "hey, you can do that? That's cool!" factor when you
>> first discover recursion.
>
>
> My point was that it seems to be a natural idea for many beginners, they
> discover it without being told. They just assume it will work.
> It comes up time and time again on this list from people who have
> never heard of it but are using it.
>
> Whereas others who need to be explicitly taught about it find it totally
> bizarre and mind bending. I've come to the conclusion that its a
> right-brain, left-brain type of thing. For some it just seems logical, for
> others perverse!
>
> Presumably John McCarthy was one of those who found it natural! :-)
>
>
> --
> Alan G
> Author of the Learn to Program web site
> http://www.alan-g.me.uk/
>
> _______________________________________________
> Tutor maillist  -  Tutor at python.org
> To unsubscribe or change subscription options:
> http://mail.python.org/mailman/listinfo/tutor

Interesting idea.  I thought it was pretty cool when I studied it, and
re-study recursion, but I seldom think of writing code with recursion.
 It scares me in an unnatural way.  I think that best problems for
recursion are ones with really deep data structures, and i fear they
will run out of stack space.  No evidence, just my take on using
recursion as opposed to liking to read how small some recursive
solutions are.


-- 
Joel Goldstick


More information about the Tutor mailing list