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

Issue: PROCLAIM-LEXICAL



    Date: Wed, 29 Apr 87 16:30:59 PDT
    From: edsel!bhopal!jonl at navajo.stanford.edu (Jon L White)

    So I'm a bit concerned about the proposal to add yet a third
    environment, the "global lexical", which doesn't address this
    concern.

I'm having trouble understanding how you count environments.  I count a
total of four:

       1. lexical LAMBDA-bindings
       2. global lexical
       3. dynamic LAMBDA-bindings
       4. global dynamic

KMP doesn't suggest ADDING a global lexical environment; the global
lexical environment is already there in the GENERAL and RESTRICTED
proposals.  He merely suggests making it not be identical to the global
dynamic environment.  This would make a total of 4 environments, not 3.

I tend to think of 2 and 4 as being part of 1 and 3.  This is consistent
if you imagine that there's an immense cosmic LAMBDA surrounding all
the programs in the world; this LAMBDA binds all possible names.

I have no opinion at this point on the virtues of KMP's amendment.

    In this example, it would/should be illegal to lambda-bind x if it were
    declared "global"; thus it is quite satisfactory to use the
    shallow-binding value cell as both the "global" cell and the "special"
    cell...

This proposal is even more restrictive than RESTRICTED.  I see no reason
to impose this restriction, and I see Scheme compatibility as a big
reason that we SHOULD allow lambda-binding variables which have global
bindings.  The RESTRICTED proposal seems to give you everything you want
-- it allows you to have a single global value cell in
shallow-dynamic-binding implementations, and it allows the desired
performance advantages in deep-dynamic-binding implementations.  Why do
you want to rule out lexically lambda-binding global variables?  Does
this have something to do with shallow lexical binding?

If I have told you something you didn't already know, or if you still
don't understand what I'm getting at, how can I make the proposals
clearer?

Jonathan