[plt-scheme] guido on tail recursion

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Sat Apr 25 19:44:48 EDT 2009


I'm not old enough either, but that's not my understanding.

The structured programming debate was pretty much resolved by the
early 70s.  Even languages like C had several structured constructs,
which I see as a clear indication that the debate was essentially
settled.  Sure, there was a little latent argument about goto's, but I
don't think it was considered that significant (and C took the
"pragmatic" view of letting both co-exist).

What Actors did was to push the structured programming argument from
earth to the stratosphere: a dynamic structuring technique of
delegating as much work as possible to some other entity (Actor).
This was a radical architecture that went way beyond anything many
structured programming folks -- those in that community who were stuck
in the world of syntax -- were talking about.

Scheme was, as you know, created to study the Actor model.  It's
unsurprising that CPS was invented around this time, and that Steele
put these two together, since Actors are a form of CPS (less
theoretical but more general).

This raised the question of how these evaluate.  I imagine that Steele
confronted these while building Rabbit.  What to do if you have CPSed
programs?  He *had* to confront this because Rabbit uses CPS as its
intermediate representation.

But thinking about this via CPS is a particularly good idea; it's one
of those cases where trying to solve the "harder" problem yields a
better answer.  Because in CPS you *have* to solve the "function call
problem" (therefore, it's a harder thing to deal with than direct
style, where you can duck it, as most have before and since), but you
also realize that function calls aren't the same as stack frames
(therefore, it also points to the better answer, which is obscured in
a more traditional representation).  Steele had the wisdom to observe
that this insight was not peculiar to CPS; it carried back to direct
style and *everyone* could use it.


Posted on the users mailing list.