[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

is make-environment really necessary for packages?



I do not understand the need for an explicit environment type in scheme.
It seems that lambda could serve the same purpose.

Suppose there were not an explicit environment type.  In this case,
the procedure "eval" would take only a single parameter: the expression
to be evaluated (in the current environment).

Packages, which are currently created this way:

    (define foo (make-environment
	(define x ...)
	(define y ...)
	...
	))

and used this way:

    (eval '(expression) foo)

Could still be created this way:

    (define foo (let ()
	(define x ...)
	(define y ...)
	...
	(lambda (_x) (eval _x))
	))

and used this way:

    (foo '(expression))

It would appear that environments are unnecessary.  The Revised^3
report does not include any description of "make-environment", "eval",
or "access".

	Neal Gafter <neal@cs.rochester.edu>
-- 
Arpa:	neal@cs.rochester.edu (Neal Gafter)
UUCP:	...{rocksvax|allegra|decvax}!rochester!neal
USnail:	Department of Computer Science, U. of Rochester, N.Y. 14627
phone:	(716) 275 - 1348 (office)  or  (716) 473 - 2361 (home)