[plt-scheme] guido on tail recursion

From: Joe Marshall (jmarshall at alum.mit.edu)
Date: Sat Apr 25 14:29:20 EDT 2009

On Sat, Apr 25, 2009 at 6:29 AM, Grant Rettke <grettke at acm.org> wrote:
>
> It took me a long time to understand and appreciate tail-calls.

I always appreciated tail calls because I thought they were `the right thing'.
The computer figured out the looping without you having to think about it.
Furthermore, it figured out loops you might not have known about.  I
considered this an extra bonus.

Then when I learned CPS, and found that you needed tail recursion for that
to work I became convinced that they were a good thing.  But this was
only from a practical standpoint.

It took me a bit longer to truly *understand* tail recursion, and at times I
think I forget and fall back on just appreciating the utility.  I think that
only a handful of people truly `get it', and sometimes I feel like I might be
in that group, but other times I'm not sure.  But I do know that regardless
of *why* you like tail recursion, you've definitely decided correctly on a
very important concept.

> Sure in retrospect I guess it is obvious where their power lies; but
> then again based on this thread maybe it is not obvious, or at least I
> was not the only one who didn't get it.

I'm still learning things about Scheme and tail recursion.

> "Scheme is hard because it is because it is subtle" to paraphrase
> Aaron Hsu.

It is very subtle!
-- 
~jrm


Posted on the users mailing list.