[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: semantics of DEFINE (why use it at all on the top level?)
In article <firstname.lastname@example.org.UUCP>, I wrote:
>In article <email@example.com>, biep@cs (J A Biep Durieux) writes:
>>In article <890503-103409-9762@Xerox> Pavel.pa@XEROX.COM writes:
>>>-- A program is a mixed sequence of definitions and expressions.
>>>--The meaning of a program P is the same as that of the expression:
>>> ((lambda (I*) P') <undefined> ...)
>>Then why not actually do this?
>>-- The scheme top-level environment has each variable bound to a unique
>> location. Many of these locations will be assigned the value
>>-- The user can assign other values to variable locations using "set!".
>> A "define" on top level will be an error, since the variable is
>> already bound on that level.
>First, the system has to know what symbols to bind in the global LET
>contour. It would be consistant to have DEFINE always specify that a
>symbol be included in this binding.
>Secondly, having internal DEFINEs do local definitions is even more
>redundant, since it is 100% translatable into a LETREC while DEFINE is
>needed to specify what variables should be bound.
Gee that last paragraph reads like gibberish. What I meant was:
Secondly, having internal DEFINEs do local definitions is even more
reduntant since this is 100% translatable into LETREC. On the other
hand, top-level DEFINEs are not 100% translatable since some specification
is needed of which variables should be in the top-level contour.