guile-devel
[Top][All Lists]
Advanced

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

Re: eval


From: Neil Jerram
Subject: Re: eval
Date: 06 Feb 2001 01:12:51 +0000

>>>>> "Dirk" == Dirk Herrmann <address@hidden> writes:

    >>  A quick check: I believe that (interaction-environment) is the
    >> same as what I've been calling (current-environment), i.e. the
    >> environment in which the next thing that is entered will be
    >> evaluated.  Is that still correct in your generalization?

    Dirk> Hmmm, I am not sure if we really mean the same thing here: I
    Dirk> use the term (interaction-environment) in the following
    Dirk> sense: interaction-environment is a function, that returns
    Dirk> an environment.  It is meant to return the environment, in
    Dirk> which the next interactively entered expression will be
    Dirk> evaluated. 

Good -- that's exactly what I meant too.

    >>  Interesting, but I can't think of any cases where it would be
    >> useful not to do a (set-interaction-environment the-module*),
    >> i.e.  for (interaction-environment) to be other than the
    >> selected module's environment. [...]

    Dirk> Well, I think there are actually only a _few_ situations
    Dirk> where the result of (interaction-environment) should change:
    Dirk> The repl itself can decide whether the interaction
    Dirk> environment should be changed.  Further, if there is a GUI,
    Dirk> the user might for example have a menu item "select
    Dirk> interaction environment".  What other situations are there,
    Dirk> where the interaction environment should change?

Well, when the user types `(define-module ...)'.

But my question was: what would be the meaning of the selected module
and interaction-environment being different, and how would this state
differ from that in which the module had not been selected?

This thread is IMO academic now, since I think that Marius' solution
is better than what we have being discussing, but I'm still curious
about what you meant above.

Regards,
        Neil



reply via email to

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