This site is a static rendering of the Trac instance that was used by R7RS-WG1 for its work on R7RS-small (PDF), which was ratified in 2013. For more information, see Home.

Ticket 159: base environments

2012-10-07 09:06:45
WG1 - Core
alexshinn
major
alexshinn
fixed
source
closed
2011-04-19 20:40:26
defect

What is the base environment provided by the repl, scripts, and the result of (scheme-report-environment 7)?

The intention was the base script environment was empty, scheme-report-environment was (scheme base), and repls were an implementation-defined superset thereof, but there are other options and we need to clarify this.

I'm thinking that scheme-report-environment just doesn't make sense any more. I think that scripts and the REPL should both be implementation-dependent supersets of (scheme base) -- indeed, I don't see any point in distinguishing between the two. Both scripting and interaction are environments in which convenience should trump bureaucracy.

R6RS has a procedure environment which accepts multiple arguments which look like import specs, and returns an environment containing the specified names. So (environment) is equivalent to R5RS (empty-environment), (environment '(scheme base)) returns a base environment, and so on. That makes a lot of sense to me.

resolution
statusnewdecided

We voted for the original intent as described above.

statusdecidedwriting
resolutionfixed
statuswritingclosed

We now talk of programs rather than scripts, and (scheme-report-environment 5) returns the same as (environment '(scheme r5rs)), but the basic intent is preserved: programs start with an empty environment, REPLs don't.