This is the mail archive of the
kawa@sources.redhat.com
mailing list for the Kawa project.
Specification of interaction-environment?
- To: kawa at sourceware dot cygnus dot com
- Subject: Specification of interaction-environment?
- From: Jocelyn Paine <popx at pop3 dot ifs dot org dot uk>
- Date: Sun, 7 Oct 2001 19:06:36 +0100 (GMT)
May I ask about the specification of interaction-environment? R5S5
says:
Function: interaction-environment
This optional procedure returns a specifier for the environment
that contains implementation-defined bindings, typically a
superset of those listed in the report. The intent is that this
procedure will return the environment in which the implementation
would evaluate expressions dynamically typed by the user.
I interpreted this as implying that the result of this function would be a
new environment, "pristine" in the way that the new environment set up
when the user starts up Kawa and begins typing expressions into it is
pristine.
However, I then discovered that the result of the function appears just to
be the current environment. If I create an interaction-environment E, and
then load a source file into my current environment, the bindings from
that file appear in E.
This is consistent with what Per says in a message of 15 Oct 1998:
Well, some of the hooks are there. The R5RS call:
(interaction-environment)
gives you access to the top-level enevironment.
but is it the most appropriate implementation of the second sentence of
the R5S5 description? I think the user would expect an environment that
contains only the standard functions and variables, not one polluted by
whatever other bindings might be in the current environment. At any rate,
I was surprised by Kawa's interpretation.
Jocelyn Paine
http://www.ifs.org.uk/~popx/
+44 (0)7768 534 091