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

Re: DRAFT of the Revised Revised Report

    2 & 5)	The reason for not having a different name for the one-armed
    IF is that we tried very hard to keep the number of special forms to a
    minimum.  Since they are easily distinguished by the number of
    subforms, there is no need to add another.  Note that the same
    philosophy leads MIT to have named LET, which is exactly (except for
    the name) what ITERATE used to be.

I used to have both one-armed "if" and named "let" in my system.  I got
tired of explaining that the return value of "if" is defined if there
are two arms but undefined if there is one arm.  With "let", I got
tired of explaining that it creates simple bindings in the one case
and performs looping/recursion in the other.  "let" is such an important
special form that it is inappropriate to give it two such different

If you have two syntaxes for one special form, then you have two special
forms.  The only difference is that they are distinguished by more than
just the syntax keyword.  If one of the two is a natural extension of the
other, fine, otherwise the situation leads to unwarranted confusion.
(The "number of subforms" is an easy distinction for a compiler, but not
always for the eye.  I prefer the distinction to be more obvious.)

Incidentally, I had named "let" in my system to correspond to named
"lambda", so named "let" was easy to explain in terms of named "lambda".
Of course, the destructuring lambda-list syntax blew that away.


I prefer to include "when" and "unless".  Cond is not an acceptable
alternative; it is best used to reduce nesting in long sequences of
"if-then-else-if" expressions.  While we're at it, I'd like to see
both "cond" and "case" require an "else" clause.

I also prefer the name "recurse" to "iterate" or named "let", and would
like to see it required by the standard.