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

Kevin Reid kpreid at mac.com
Tue Aug 12 09:59:49 CDT 2008


On Aug 11, 2008, at 18:16, Lex Spoon wrote:

> On Aug 10, 2008, at 8:25 PM, Kevin Reid wrote:
>> 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.
>
> That sounds good except that it's also fine to talk about a static
> environment.  A static environment gives what is known at compile
> time about, well, a run-time environment.  It typically includes a
> list of available variable names, along with their types if the
> language is statically typed.

Ah, yes, that's true. E-on-CL has the StaticWalkEnvironment mechanism  
which is a generalization of E-on-Java's 'StaticScope' to assist code- 
analyzing programs. (No documentation (yet), sorry.)

> Environments are closely related to the ambient authority that  
> caps   folks talk about.

That's a bit of an alarming notion, but I can't think of a refutation  
at the moment.

-- 
Kevin Reid                            <http://homepage.mac.com/kpreid/>




More information about the e-lang mailing list