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

re: Dynamic binding



RPG replies to Gyro:

    Not actually: we have only made [GOTO] harder to spell and split its name
    in two parts, one of which the user gets to choose. It is now called
    call-with-current-continuation/<a name of your choosing here>.

    [No smiley face]

Actually:  Sussman and Steele generalized GOTO when most people were
trying to abolish it.  This generalization was successful:  It is
easier to make a case for CALL-WITH-CURRENT-CONTINUATION than for
GOTO, and it would almost be irrational to design a new language that
includes unrestricted GOTOs but doesn't include an equivalent to
CALL-WITH-CURRENT-CONTINUATION.  On the other hand, it is perfectly
rational to design a new language that includes neither.

It is also perfectly rational to design a language that does not include
dynamics.  It's interesting that fluid variables were originally part of
Scheme, were effectively dropped from the language during the drive for
simplicity, and are now being proposed again in rather different form.

[begin smiley face]

In any tradeoff between simplicity and power, there are two principled
positions.  Maybe we should have Scheme Level 0, which includes neither
CALL-WITH-CURRENT-CONTINUATION nor dynamics, and Scheme Level 1, which
includes both CALL-WITH-CURRENT-CONTINUATION and the appropriate
generalization of dynamics.

I got to thinking about the choice between abolishing or generalizing
the historical distinction between the value and function environments
in Lisp, and for a moment I thought that we should also have Lisp Level 0,
which uses only one environment, and Lisp Level 1, which has an infinity
of environments, one for each type.  Then I realized that Lisp Level 0 is
both simpler and more powerful than Lisp Level 1, so this wouldn't make
sense.

[end smiley face]

Peace, Will