This is the mail archive of the kawa@sources.redhat.com mailing list for the Kawa project.


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

Re: null-environment


Daniele Maraschi <maraschi@lirmm.fr> writes:

> #|kawa:1|# (define env (null-environment))
> #|kawa:2|# env
> #<procedure null-environment>
> #|kawa:3|# (eval '(define a 5) env)
> #|kawa:4|# a
> 5
> #|kawa:5|#
> 
> Probably, the effect is not what it was expected!

Please read R5RS section 6.5 "Eval".

Kawa should perhaps give an error message, but what you did is clearly
invalid and meaningless.

> I think, maybe, the semantic was to returns a new "empty" environment,

No, (null-environment) does not create a *new* "empty" environment.
It returns the same one each time.  Agin, please read R5RS section 6.5.
-- 
	--Per Bothner
per@bothner.com   http://www.bothner.com/~per/

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