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

Recognizing QUOTE deemed harmful to EVAL's laziness



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
exceptions:

   - 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))
	        x)
	       (else `',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.]