[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/1.4.2.3i |
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
pgpShuYOC_MOF.pgp
Description: PGP signature
- [Chicken-users] Modules and environments, Peter Bex, 2009/08/30
- Re: [Chicken-users] Modules and environments, Thomas Chust, 2009/08/30
- Re: [Chicken-users] Modules and environments,
Peter Bex <=
- Re: [Chicken-users] Modules and environments, Thomas Chust, 2009/08/30
- Re: [Chicken-users] Modules and environments, Peter Bex, 2009/08/30
- Re: [Chicken-users] Modules and environments, Thomas Chust, 2009/08/30
- Re: [Chicken-users] Modules and environments, Peter Bex, 2009/08/30
- Re: [Chicken-users] Modules and environments, Thomas Chust, 2009/08/30
- Re: [Chicken-users] Modules and environments, Peter Bex, 2009/08/30
- Re: [Chicken-users] Modules and environments, Kon Lovett, 2009/08/30
- Re: [Chicken-users] Modules and environments, Peter Bex, 2009/08/30
- [Chicken-users] Re: Modules and environments, felix, 2009/08/31