[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 <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.