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: local-eval


Daniel Lakeland wrote:
> 
> scheme-report-environment, according to the R5RS is supposed to be
> immutable... though they don't necessarily mean that you can't define
> new variables, but only that you can't change the value of the
> pre-defined ones...
> 
> Specifically, they say:
> 
> Implementations may extend eval to allow non-expression programs
> (definitions) as the first argument and to allow other values as
> environments, with the restriction that eval is not allowed to create
> new bindings in the environment assocated with null-environment or
> scheme-report-environment.

I think this is intended to mean that if you eval something in 
scheme-report-environment or null-environment which is a define, it
will not be in effect the next time you do an eval in that environment,
which makes sense, otherwise it would be hard for portable code to
depend on the contents of those environments. It seems this would make
evaluating defines in such environments relatively useless, except
cases like '(begin (define car 3) (cons car car)).

 - Maciej