[plt-scheme] Are continuations discussed in HtDP?

From: Shriram Krishnamurthi (sk at cs.brown.edu)
Date: Tue Mar 30 15:39:33 EST 2004

Jerzy Karczmarczuk wrote:

> >   http://www.cs.brown.edu/~sk/Publications/Books/ProgLangs/
> >   Programming Languages: Application and Interpretation
> 1. Could you say what is your pedagogic philosophy behind this text. I know
>     it and I appreciate it. For whom has it been written?

Thanks.  My long-term vision for teaching programming languages is to
integrate the "two cultures" that have evolved in its pedagogy.  I was
raised in the interpreter (EoPL) culture, which meant I looked with
some disdain at the "survey of languages" courses.  After a while I
realized that otherwise intelligent people used the survey approach,
so I spent some time trying to understand what they got out of it.

I still think that not doing interpreters (broadly construed) is a
mistake, and students who go through the experience of doing it come
out with a much richer perspective.  But what I have realized is that
students who don't do the survey also lose something valuable.

Since a course needs one dominant philosophy, I decided to make the
interpreters dominant but use the survey to inform the interpreters.
So students program with a new set of features first (survey), then
try to distill those principles into an actual interpreter.  This has
the following benefits:

- by seeing the feature in the context of a real language, they can
  build something interesting with it first, so they understand that
  it isn't an entirely theoretical construct, and will actually *care*
  to build an interpreter for it (in my experience, a few students who
  are interested in knowledge for its own sake will get excited about
  the interpreter in either case, but I want to also capture the
  attention of the other 90%)

- they get at least fleeting exposure to multiple languages, which is
  an important educational attribute that is fast being crushed in
  this era of Java's dominance (and in the process, they come to
  understand why Java will not be the last word in languages)

- because they have already coded with the feature, the explanations
  and discussions are much more interesting than when all they have
  seen is an abstract model

- by first building a mental model for the feature through experience,
  they have a much better chance of actually figuring out how the
  interpreter is supposed to work

In short, many more humans work by induction than by deduction, so a
pedagogy that supports it is much more likely to succeed than one that
suppresses it.  The book currently reflects this design, though the
survey parts are done better (!) in lecture than in the book; that
will change in future versions.

Separate from this vision is a goal.  My goal is to not only teach
students new material, but to also change the way they solve problems;
as Marx wrote, "The philosophers have only interpreted the world in
various ways; the point, however, is to change it."  I want to show
students where languages come from (the language "nebula"), why we
should regard languages as the ultimate form of abstraction, how to
recognize such an evolving abstraction, and how to turn what they
recognize into a language.  The last section of the book, on
domain-specific languages, is a very, very weak step in this
direction.  The homeworks I've done in the class have conveyed this
point much better.  Over time, I will update the text to reflect what
the homeworks have taught.

The book is currently the sole textbook for the programming languages
course at Brown, where it is taken primarily by juniors (3rd year),
seniors (4th year) and beginning graduate (both MS and PhD) students.
It seems very accessible to smart sophomores (2nd year) too, and
indeed those are some of my most successful students.  The book has
been used at some other universities as a primary or secondary text.
The book's material is worth one undergraduate course worth of credit;
for students who want graduate credit, I supplement the material in
the book with some research paper readings.

The book is still very much under development.  

One common criticism I have heard of the text is that the writing is
too colloquial; it sounds too much like me standing in front of a room
and lecturing.  However, I don't intend to change the voice of the
book (tighten it, of course; change it, no).  I've been told this may
make it much harder to publish the book formally.  Either way, I
intend to continue offering a full, free copy on the Web.

Comments welcome.


Posted on the users mailing list.