[e-lang] "Scope" or "Environment"? Your observations wanted

David-Sarah Hopwood david.hopwood at industrial-designers.co.uk
Mon Aug 11 14:46:01 CDT 2008


Kevin Reid wrote:
> I've been arguing (to MarkM) that the thing which E-on-Java calls  
> Scope should be called Environment, or Env.
> 
> What is now called Scope is a collection of nouns (variable names)  
> associated with slots providing the values for those nouns.
> 
> I have said that a "scope" actually refers to the textual region in  
> which a variable is visible; i.e. it is static, and a property of the  
> program, whereas "environment" refers to the runtime state, what the  
> variables in some scope are bound to in the execution under  
> consideration.
> 
> Am I wrong?

No, that's correct AFAIU.

(For completeness, the other term commonly used together with "scope"
and "environment", is "extent", which is the period of time in which
a variable can potentially be referred to.)

-- 
David-Sarah Hopwood


More information about the e-lang mailing list