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

define (resend) (long) (short)



    What it boils down to is that (1) the same name
    should be used inside as out to define global variables and (2) the
    right name is define.

Again, this does not make any sense in MIT Scheme, where user code
runs by default in an environment which inherits the "global"
bindings, rather than the one were the bindings actually exist.  Top
level DEFINEs do not define in the global environment, but in whatever
environment the code is loaded.  The default top level environment is
an environment with an empty top frame, and whose parent frame
contains the initial accessible bindings of the system.  Our system
(local and incremental DEFINE) is perfectly consistent, since DEFINE
always acts on the environment where the definition is evaluated.
There is no difference between top level and inner environments.  As a
matter of fact, top level is changed at various times, and thus top
level DEFINE acts on different environments at different times.

Indiana style DEFINE sounds horrendous to me because the evaluation
happens in one environment, while the "assignment" happens in another,
without making this explicitely visible.  Nevertheless, I'm willing to
have it added it to the report as long as it has a different name
(DEF?).  Note that if DEF is implemented, it will also "work" at top
level, so you can always use the same name.

    You mentioned the possibility of omitting internal define altogether.
    We would be satisfied with that.  The report should say something to
    the effect of portable code should only use the define/set! form (or
    appropriate sugaring).  This seems to be the only viable solution.

Again, this is being gratuitously different from the previous version
of the report, and S&ICP.  We are keeping T and NIL, #!TRUE and
#!FALSE, just to be backwards compatible.  Removing DEFINE would allow
implementations (like you) to have semantics completely incompatible
with the previous report.

Look guys, I hate BEGIN with all my guts.  I am not fighting against
it.  We had a vote at Brandeis and it WON (I cast the only vote
against it).  I (and JAR, and GJS, who hate it almost as much as I do)
abide by that decision (although I occasionally grumble about it, as
well as about REC).  I would very much like to see it out, but if
everybody does this we will never agree on anything, because everybody
will find something they do not like.  I'm afraid that DEFINE must
stay the way it is, and I (and the rest of the Scheme people at MIT,
plus others, I'm sure) will oppose any changes to it.  You are
reopening a can of worms which was closed at Brandeis.  Since we are
at it, why don't we argue again about when CALL-WITH-INPUT-FILE closes
the file or whether the name should be LETREC or LABELS?