[plt-scheme] Are continuations discussed in HtDP?

From: Matthias Felleisen (matthias at ccs.neu.edu)
Date: Mon Mar 29 08:41:54 EST 2004

On Mar 29, 2004, at 3:33 AM, Jerzy Karczmarczuk wrote:

> The problem is that I adore continuations!!

So did I. I never thought of the word "adore" but it comes close. I 
taught prompt, F, handler, Fcontrol, you name it for a couple of years 
in the PL course (EoPL according to my taste). My dissertation was 
about this stuff. My first student's dissertation was about this stuff.

> May call/cc be with you.

Yes! How can you live without knowing it? That's what I thought. And 
students who graduated from my courses knew what call/cc was about, if 
nothing else. Well macros perhaps.


> 2. A general question for ALL of you. This year I have been  finally 
> forced not
>    just to teach what I liked, just *using* Scheme, but to teach 
> Scheme...
>
>    Do you think that for CompSci freshmen - the continuations are to 
> be taught,
>    or it turned out *practically* that this is an overkill? (If you 
> have *any
>    experimental* doubts, I know what to do, since for serious reasons 
> I must be
>    minimalist, first-year students in France are very fragile and 
> randomly-
>    oriented, since they had never any admittance exam to pass)

And yet, I recommend that you ditch them on the spot. Don't even 
mention call not to speak of cc. Please! For the sake of Scheme.

Why? The first year I taught freshmen, I ran through the whole thing. I 
spent the last two weeks writing an OS kernel using continuations for 
thread substitutes (didn't have threads back then) and queues and 
mailboxes and friends. Then I stood back and watched my students, my 
brilliant call/cc-programming students, fail in this stupid C++ course. 
How could that be? They had mastered the force and yet they didn't know 
how to shuffle a few bits around?

It was then that it hit me the first time that we (Schemers) 
misunderstood the role of the first course. We can accomplish two 
things in such a course. (1) Teach them how to program well. I don't 
know of another language that can do this so well. (2) Teach them how 
to use Scheme for everyday tasks so that they have a powerful tool at 
their disposal.

Over the years I started seeing (1) as the more important direction, 
and HtDP is what came from that. In all honesty, I sometimes think that 
I went way too far in the direction of (1) and that for the sake of 
Scheme I should have done some more (2). Still, neither (1) nor (2) 
admits call/cc and friends. As much as call/cc and macros may have 
worked for us, the few select Jedis of the force, achieving (1) or (2) 
or (1) and (2) is what we should aim for first.

That's my 2 dollars, inflation adjusted cents.

-- Matthias



Posted on the users mailing list.