Subject: Re: Standard Module System, (was Redistributable Scheme tutorial, Environments, OO)
From: rpw3@rigden.engr.sgi.com (Rob Warnock)
Date: 1998/08/25
Newsgroups: comp.lang.scheme
Message-ID: <6rtdmm$1fm4b@fido.engr.sgi.com>
Guillermo 'Bill' J. Rozas <gjr@cobalt.transmeta.com> wrote:
+---------------
| The environment specifiers returned by the suitable procedures in R5RS
| and taken by EVAL as a second argument are first-class values.  They
| can be passed around, stored in data structures and closures, etc.
| 
| However, they lack the other features that would make them into
| "first-class environments".
+---------------

So, for example, if an implementation chose to do the following
(with the understanding that "eval" would "do the right thing"
when passed one of the indicated values), that would satisfy R5RS?

	(define *magic-env-flag* (list '*magic-env-flag*))

	(define (null-environment vers)
	  (if (= vers 5)
	    (cons *magic-env-flag* 0)
	    (error "bad env version" vers)))

	(define (scheme-report-environment vers)
	  (if (= vers 5)
	    (cons *magic-env-flag* 1)
	    (error "bad env version" vers)))

	(define (interaction-environment)
	  (cons *magic-env-flag* 2))


-Rob

-----
Rob Warnock, 7L-551		rpw3@sgi.com   http://reality.sgi.com/rpw3/
Silicon Graphics, Inc.		Phone: 650-933-1673
2011 N. Shoreline Blvd.		FAX: none (temp)
Mountain View, CA  94043	PP-ASEL-IA