[plt-scheme] Is it important to understand continuations conceptually; not in terms of their implementation?

From: Grant Rettke (grettke at acm.org)
Date: Sat May 3 12:13:14 EDT 2008

Hi Matt,

On Sat, May 3, 2008 at 10:46 AM, Matt Jadud <jadudm at gmail.com> wrote:

>  Are you asking "Does having an accurate model of continuations
>  adversely affect the ability to understand the use of continuations?"

I have been thinking a lot about the notion that there is a "what we
want to accomplish" and "how we will accomplish that with programming
languages". So, there is this idea of the "what" and the "how" when it
comes to programming languages.

When folks learn programing languages, there is this focus (by nature
or by bad habit?) only on the "how". This is a disservice to the
student because they never develop the notion that for example that
there is a concept of "binding a value to a name" (the what) and
instead they only every learn the notion of "I want to declare a
variable" and they have to re-learn it every time they learn a new
language. Now that example is trivial but the point is that there is
that difference between internalizing the idea that "binding a value
to a name" is the hugely important concept and that how it is done in
a particular language is just a realization of such a concept.

Taking that idea to continuations, I see that most of the explanations
of them focus on the stack. This is the "how", not the "what". The
implication is that whenever said student goes to a different language
he will only ever understand the concept of a continuation in terms of
how it is implemented (the how) without benefiting from internalizing
the concept of continuations. The disservice here is that when he goes
to language that doesn't have continuations he won't be able to
benefit by using the language in such a manner that the "spirit" of
continuations could be implemented, instead giving up since he doesn't
have access to the stack to implement what he knows about
continuations from language X.

The thing I am wondering about continuations is the "what" part. Is
the concept as simple as "it is the rest of the program" and there is
nothing more to it. Maybe I am assuming there is a bigger idea to it
when it comes to computation, when there really is not.

Posted on the users mailing list.