[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: named-let proposal

> I understand that this ordering is repugnant to the folks at Indiana,

I do not find your method of introducing students to internal "define"s
first, "let" second, and named "let" third "repugnant".  However, I do
have problems with it.  We use "letrec" for two reasons other than the
obvious historical reason.  The first is that internal "define"s look
like imperative operations, whereas "letrec" bindings do not.  The
second is that "letrec" emphasizes the relationship between names and
values, as does "let"; with "letrec" this relationship is a circular
one.  In my opinion, this relationship is not as easy to see with
internal "define"s.  We spend a lot of time trying to be sure that
students learn that names and procedures are separable, i.e., that the
relationships between names and procedures are external in that they
depend on the binding construct.  This is why we use "lambda" every
time we define a procedure at top level, e.g.:

   (define id (lambda (x) x))

instead of using the shorter "defun"-style syntax:

   (define (id x) x)

This also explains why we prefer "rec" to "named-lambda".  These may
seem like picky points to many (most?), but we want to be sure that the
syntax we use does not give false impressions.