On Sun, Aug 30, 2009 at 04:42:43PM +0200, Thomas Chust wrote:
Hello,
I think importing a module and pasting its code into another context
are not equivalent: The module definition itself sets up bindings in
the environment while the import establishes a mapping between
identifiers used in the code and in the execution environment. This
mapping is purely syntactic and can't be queried by examining the
runtime content of the environment datastructure.
This sounds like a bug to me; the identifiers are certainly
available to
code running in that environment. Why shouldn't one be able to
observe
the fact that they are?
If (print (environment-has-binding? (interaction-environment) 'hello))
shows #f, then I would expect (eval '(hello) (interaction-
environment))
to fail, but it simply prints "hello".
Cheers,
Peter
--
http://sjamaan.ath.cx
--
"The process of preparing programs for a digital computer
is especially attractive, not only because it can be economically
and scientifically rewarding, but also because it can be an aesthetic
experience much like composing poetry or music."
-- Donald Knuth
_______________________________________________
Chicken-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/chicken-users