[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-users] Modules and environments

From: Peter Bex
Subject: Re: [Chicken-users] Modules and environments
Date: Sun, 30 Aug 2009 19:04:24 +0200
User-agent: Mutt/

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".

"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

Attachment: pgpShuYOC_MOF.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]