This is the mail archive of the guile@cygnus.com mailing list for the guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: First-class environment proposal



			      Hello Jim,
sounds like a good proposal to me.  It was easy to follow, here are
some comments after a first pass:

Maybe "finite" should be changed to "simple"?  All environments are
finite.

>- Primitive: make-eval-env LOCAL IMPORTED
>     Return a new environment object EVAL whose bindings are the union
>     of those in LOCAL and IMPORTED, both environments, with bindings
>     from LOCAL taking precedence.  Definitions made in EVAL are placed
>     in LOCAL.
>
>     That is, EVAL binds SYMBOL to LOCATION iff LOCAL does, or SYMBOL
>     is unbound in LOCAL, and IMPORTED binds SYMBOL to LOCATION.
>
>     Applying `env-define' or `env-undefine' to EVAL has the same
>     effect as applying the procedure to LOCAL.

What happens when env-undefine is applied to a SYMBOL which is bound
in IMPORTED?  The text implies that nothing is changed (i.e. the
binding remains in IMPORTED and is visible in EVAL), but I wonder
whether that's what people expect.  After all, the idea is to merge
LOCAL and IMPORTED, isn't it?  If the binding is removed from EVAL,
does it affect other environments importing IMPORTED?

regards
Roland