Problem with recursion? (was [plt-scheme] Re: Novice needs help writing function )
On Jan 4, 2008 11:15 AM, <jerzy.karczmarczuk at info.unicaen.fr> wrote:
> Yavuz Arkun writes:
>
> > When I am trying to understand a program, I put myself in the place of the
> > computer and work through the program in my mind.
>
> Sorry to be a bit nasty once more, but this attitude - even if it works
> for you - should be absolutely screened from students, especially newbies.
> They should grasp the meaning, and if it can be done in a stateless, static
> way, the better. Your technique is pedagogically murderous! My goodness,
> squeezing students heads into computers...
Yes. If I recall correctly, my first serious exposure to recursion
was in a data-structures class taught in C. I remember getting
hopelessly tangled up in how the recursion would be implemented --
stacks, activation records, local variables, etc. It was much later,
while reading The Little Lisper, that I learned to relax and not worry
about the fact that the functions I was calling recursively happened
to have the same name as the function I was defining. Of course
there's less to worry about when doing this in scheme and avoiding
assignment.
--
Phil Rand
philrand at pobox.com