On Thu, Aug 4, 2011 at 12:46 PM, John Cowan <[email protected]> wrote: > Alex Shinn scripsit: > >> The initial (or "top level") Scheme environment is empty, and >> bindings must be introduced with import. >> >> which could indeed be worded better - the implication of the >> second clause is that `import' is provided. The initial >> environment is indeed empty of everything other than `import'. > > However, the "initial environment" is *not* the environment in effect > when the REPL starts up. That includes at least the base and optionally > whatever the implementation wishes to provide. > > In fact, I do not know what "initial environment" means at all.
It's the environment programs start with. The result is that any program can be cut&paste into an interactive REPL and still work, and any interactive session can be saved and used as a program, so long as it's prefixed with (import (scheme base)). It would be cleaner to make the initial REPL env empty as well (and cleaner still to make importing out-of-band as in Scheme48), but this contradicts every existing REPL and would be confusing for students. -- Alex _______________________________________________ Scheme-reports mailing list [email protected] http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports
