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

Issue: PROCLAIM-LEXICAL (Version 8)



re: . . . 
     JonL hadn't studied this enough and had a bunch of questions.
     Maybe we'll get more feedback from him when he's read it more carefully.
    Offline:
     Julian Padgett (I probably got the spelling wrong) said he
     supports the LG proposal. He doesn't like the D stuff getting
     mixed up in there at all.

My problem with this proposal was exactly that attributed to Padgett.
The LG proposal doesn't clearly spell out that it is an error to have 
dynamic bindings for variables declared LEXICAL -- I don't yet see it as
being distinct from the LDG proposal.   If this prohibition were agreed 
upon, then the whole set of issues discussed under the "Cost to 
Implementors" section would be moot, and that section could simply say 
"slight".

I'm just a bit puzzled by the current state of the proposal -- your
comments (KMP's) in the Discussion section indicate that you think it 
already rules out the objectional case:
  Pitman supports PROCLAIM-LEXICAL:LG and believes that giving LDG the
  name LEXICAL would be a serious mistake, leaving open the door for
  program bugs due to accidental binding of variables presumed by the
  programmer not to be bound. If someone (Moon?) seriously wanted LDG
  type variables in addition to LG variables (under a name other than
  LEXICAL), Pitman would not object.
If this is so, then perhaps all we need to do is clarify the wording
of the proposal a bit.


In particular, in the Proposal part, I would change:

  Clarify that dynamic binding does DG lookup.  That is, variables
  declared SPECIAL would be looked up first in the dynamic
  environment (D) and then in the global environment (G) if not found
  in the lexical. Further clarify that SYMBOL-VALUE does DG lookup.

  Define that a dynamic binding of a variable creates a new binding
  in the dynamic environment (D) leaving the global environment (G)
  unaffected.

into:

  Clarify that a dynamic binding of a variable creates a new binding
  in the dynamic environment (D) leaving the global environment (G)
  unaffected.

  Clarify that special variable access does DG lookup.  That is, 
  variables declared SPECIAL would be looked up first in the dynamic
  environment (D) and then in the global environment (G) if not found
  in the dynamic one. Further clarify that SYMBOL-VALUE does DG lookup.

And I would change:

  Define that a lexical binding of a variable creates a new binding
  in the lexical environment (L), leaving the global environment (G)
  unaffected.

into:

  Define that a lexical binding of a variable creates a new binding
  in the lexical environment (L), leaving the global environment (G)
  and the dynamic environment (D) unaffected.

Furthermore, I would ammended the Discussion section to explain the remark:

  JonL expressed concerns about the last-minute nature of this change,
  which he sees as untested.

so that the "last-minute" is clearly seen to be referring to the mixin of 
the dynamic environment implicit in the LDG proposal.


I have long favored the approach that permitted LEXICAL proclamation to
mean basically what QLISP's GLOBAL proclamation does.   I think LEXICAL 
would also permit local lexical bindings, whereas GLOBAL doesn't, but 
that isn't important; flushing the dynamic mixin is what I'd like to see.



-- JonL --