felix winkelmann wrote:
2. Is it possible to get the "local environment" (which should have
access to b and c)? Is there even such a thing, or am I seeing this
completely wrong?
This is not possible in general, unless you really want to peek
into the internal representation of a closure.
Thank you for your reply, Felix.
You'll have to pardon my ignorance... I am used to Python, where "eval"
and "exec" have access to all the variables that regular code has, even
in nested scopes. So I was wondering if something similar could be done
in Scheme.
The way I see it (and which is most likely incorrect :-): regular code
has access to variables in the current and enclosing scopes, so the
functionality is already there... so maybe it would be possible to have
a function (local-environment) that returns an environment containing
the local variables? Of course it would need a parent environment,
which I don't think environments.egg supports.
I will probably need to take a look at the Chicken source code to see
how it's *really* implemented. :)
Oh, which leads me to another question: I am currently using Chicken
2.6. Judging from the change log, a lot has been changed/added since
then. Is the development version stable enough to use for everyday
coding, or should I stick with the "official" 2.6 for a while?
Thanks,
--
Chicken Monk
"God loves ya. And she loves me too."
_______________________________________________
Chicken-users mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/chicken-users