[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Recognizing QUOTE deemed harmful to EVAL's laziness
- To: mcvax!inria!crcge1!adams@SEISMO.CSS.GOV
- Subject: Recognizing QUOTE deemed harmful to EVAL's laziness
- From: Jonathan A Rees <JAR@AI.AI.MIT.EDU>
- Date: Tue ,21 Jul 87 22:48:18 EDT
- Cc: scheme@MC.LCS.MIT.EDU
- In-reply-to: Msg of 21 Jul 87 09:45:43 GMT from mcvax!inria!crcge1!adams at seismo.css.gov (Drew Adams)
I don't quite see what the big deal is. I agree that reduction is a
somewhat nicer but it doesn't seem to be a very deep question. Consider
a language which is identical to Lisp (or Scheme) with the following
- There is no EVAL.
Instead, there is a procedure NORMALIZE which could be defined as
(define (normalize x environment)
(object->expression (eval x environment)))
(define (object->expression x)
(cond ((or (number? x) (char? x) (string? x) (boolean? x))
- The "datum" in (QUOTE datum) must not be "self-evaluating".
(I.e. reserve ' for use by things which don't need it. You don't
write numbers in Pascal using "...", do you? Why do the analogous
thing in Lisp?)
- PRINT writes out an expression that evaluates to the object, if
possible. E.g. (PRINT 'FOO) would write the characters 'FOO.
There's no semantic difference between this language and Lisp, only
trivial differences in the runtime library. But it would appear to have
so-called "reduction semantics", wouldn't it? So what's the big deal?
The nature of the runtime library (EVAL, PRINT, etc.) is orthogonal to
the question of laziness; a lazy Lisp would work just fine.
What is the relevance to Scheme (which has no EVAL), by the way?
[Please note: Drew Adams' message, to which this is a reply, contains
the line "Sender: scheme-request at mc.lcs.mit.edu" in its header. The
header lies; the message was NOT sent by scheme-request. I think this
is some kind of Unixoid kludge inserted automatically by a mail
system somewhere between inria and MC.]