Opened 6 years ago

Closed 5 years ago

#159 closed defect (fixed)

base environments

Reported by: alexshinn Owned by: alexshinn
Priority: major Milestone:
Component: WG1 - Core Keywords:


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.

Change History (4)

comment:1 Changed 6 years ago by cowan

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.

comment:2 Changed 6 years ago by alexshinn

  • Status changed from new to decided

We voted for the original intent as described above.

comment:3 Changed 6 years ago by alexshinn

  • Status changed from decided to writing

comment:4 Changed 5 years ago by cowan

  • Resolution set to fixed
  • Status changed from writing to closed

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.

Note: See TracTickets for help on using tickets.