This is the mail archive of the
guile@cygnus.com
mailing list for the Guile project.
Re: "environment" unsuitable name for top-level environment
- To: Mikael Djurfeldt <djurfeldt@nada.kth.se>
- Subject: Re: "environment" unsuitable name for top-level environment
- From: Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
- Date: 18 Aug 1999 19:59:51 +0200
- Cc: jimb@red-bean.com, guile@sourceware.cygnus.com
- Cc: djurfeldt@nada.kth.se
- References: <E11GpUj-0007tz-00@mdj-pc.nada.kth.se>
I'm sure most people interested in this discussion already are aware
of this, but here's a clarification regarding how lexical environment
looks like from the inside:
(define y 3)
(define (foo x)
(let ((z 5))
(* x y z))
(foo 2)
The lexical environment at the multiplication expression will have an
internal representation which looks somewhat like this:
head frame1 frame2 top level
_ _ _ _ _ _ _ _
|_|_|->|_|_|->|_|_|->|_|_|
| | | |
type z=5 x=2 "Jim proposal thing"
y=3
*=#<primitive-procedure *>
foo=#<procedure foo>
...
The lexical environment denoted by the environment specifier
`null-environment' passed as second argument to `eval' will be
represented like this:
_ _ _ _
|_|_|->|_|_|
| |
type "Jim proposal thing"
<empty>
(This is, BTW a top level environment.)
What I'm saying is that it is the above two things which are
`environments' in the true sense, while the "Jim proposal thing" is
really a part of the implementation of environments (in fact, it's not
even a top level environment if we are strict).
So, it's not very good to call the "Jim proposal thing" `environment'.