Re: global variables, no lexical address



Marlene Miller skrev:

On further thought I might be wrong. Maybe the globals variables do have
lexical addresses. Is that right?

Maybe you can use the idea from the appendix of R5RS?

If P is a program in which all variables are defined before being
referenced or assigned, then the meaning of P is

P == ((lambda (I*) P') <undefined> ...)

where I* is the sequence of variables defined in P, P' is the sequence
of expressions obtained by replacing every definition in P by an
assignment, <undefined> is an expression that evaluates to undefined,
and is the semantic function that assigns meaning to expressions.

After this transformation, all global variables are gone.

--
Jens Axel Søgaard

.



Relevant Pages

  • Re: assignment expression peeve
    ... >> The designers of Python believe that assignment expressions are bad ...
    (comp.lang.python)
  • Re: Boolean operations on Enumerations
    ... Assignment expressions require a type that is the same, ... Do you know the reasoning behind the boolean expression semantics? ... enum types for a state machine design as in; ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Is Truth Mysterious?
    ... but I don't like to think about the Liar too much ... being totally void of meaning. ... "A negative square root of Tuesday blushes isomorphically." ... In Chapter 11 he goes on to consider Boolean expressions ...
    (sci.logic)
  • Re: Why prefer != over <> for Python 3.0?
    ... and it resembles the fancy assignment statement ... When I started to learn python I came across an operator. ... operators with clear and obvious meaning. ... places (which is the reason why some languages can use the same ...
    (comp.lang.python)
  • Re: Help Need for interpretation...
    ... expressions I don't understand. ... DEF was turned around (meaning DEF's direction was ... and those of the groom on the right side (which is how ... the bride and groom also stand, ...
    (alt.usage.english)

Loading