This is the mail archive of the guile@cygnus.com mailing list for the guile project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
jimb@red-bean.com writes: > > Yes, problem 3 is the most important problem to solve. I was just > perpetuating a horribly nit-picky and meaningless debate about the > name it should have. :) > > > The R5RS doesn't address problem 3. R5RS' interaction-environment is > > a problem 2 environment. Except for the bindings it imports and > > re-exports from the scheme-report-environment, it defines it's own > > "implementation-defined" bindings. If the user would redefine these, > > he would influence the interaction-environment as seen by others as > > well. > > Hmm, have I misread R5RS? > > I thought the whole point of (interaction-environment) was that it > returned exactly the environment you were interacting with --- the > definitions you typed at the repl are here, etc. So it corresponds > exactly to what we want here. > > I'm printing out a copy of R5RS right now, and I'll check, and post > again if I'm wrong, but I'm pretty sure that's what it is. > > If, in the future, R5RS users are going to get a handle on this thing > by calling (interaction-environment), then it should have a name that > matches that. > You are right about the point of (interaction-environment) (at least by my reading of R5RS), however, IMO, there is no reason to name a module after it. In fact, I think it is actively bad to do so, as (interaction-environment) should give you a handle for the current module, IMO, not for any specific predetermined one. If you (define-module (whatever)) inside the REPL, (interaction-environment) should give you a handle on the environment you are then in. - Maciej