[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
ENCLOSE and EVAL
- To: dlw at SCRC-TENEX
- Subject: ENCLOSE and EVAL
- From: Kent M. Pitman <KMP at MIT-MC>
- Date: Fri, 03 Dec 1982 21:50:00 -0000
- Cc: COMMON-LISP at SU-AI, Guy.Steele at CMU-CS-A
I wrote an ENCLOSE for an early simulator of T and I forgot to put in the
check for LAMBDA-ness and found out that if you did (ENCLOSE '(+ 5 1)) you
got back 6, which is maybe suggestive of something. After all, what's the
difference between (ENCLOSE '(LAMBDA (X) X)) and (EVAL '(LAMBDA (X) X))?
Answer: nothing. Only that ENCLOSE looks like:
(DEFUN ENCLOSE (LAMBDA-EXP &OPTIONAL (ENV *THE-TOPLEVEL-ENVIRONMENT*))
(CHECK-ARG ...lambda-expression-p of LAMBDA-EXP...)
(*EVAL LAMBDA-EXP ENV))
If you are not going to put EVAL or *EVAL in the language, I'd definitely
say something along the lines of ENCLOSE would be a good idea because it
constraints things a bit. Since EVAL and/or *EVAL will be there, I'd say
ENCLOSE may still be notationally useful because this is a very constrained
kind of EVAL. eg, SYMEVAL is nice for the same reason. EVAL could do its
work, but somehow it doesn't feel like you're letting loose the full
unconstrained hair of the language by calling it in the same way as you
would if you called EVAL.
Since Guy was in on Scheme's replacement of EVAL with ENCLOSE, perhaps he
could comment on my conclusions here...?