Re: "Scope" or "Environment"? Your observations wanted

Kevin Reid <[email protected]>
Newsgroups gmane.comp.lang.e.general
Message-ID <[email protected]>
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/>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.