Subject: Re: evaluation
From: (Rob Warnock)
Date: 1999/10/25
Newsgroups: comp.lang.lisp
Message-ID: <7v09vh$>
Christopher R. Barry <> wrote:
| "H. Tunc Simsek" <simsek@EECS.Berkeley.Edu> writes:
| > (let ((x 1))
| >    (eval (read-from-string "x")))
| EVAL evaluates its form in the current dynamic environment and the
| null lexical environment. The best you can do is:
|   (progv '(x) '(1)
|     (eval (read-from-string "x")))

Yeah, that works, but might cause conflicts if the string contains inner
lexical bindings for "x", or if for some reason you didn't *want* "x" to
be dynamic. If he really wanted a lexical environment for EVAL, he could
always do something hacky like this:

      `(let ((x 1))
	 ,(read-from-string "x")))


Rob Warnock, 8L-846
Applied Networking
Silicon Graphics, Inc.		Phone: 650-933-1673
1600 Amphitheatre Pkwy.		FAX: 650-933-0511
Mountain View, CA  94043	PP-ASEL-IA