Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!rutgers!ucla-cs!zen!ucbvax!decvax!tektronix!tekcrl!tekchips!stevev From: stevev@tekchips.TEK.COM (Steve Vegdahl) Newsgroups: comp.lang.misc,comp.lang.lisp Subject: Re: Recognizing QUOTE deemed harmful to EVAL's laziness Message-ID: <1493@tekchips.TEK.COM> Date: Wed, 22-Jul-87 15:36:24 EDT Article-I.D.: tekchips.1493 Posted: Wed Jul 22 15:36:24 1987 Date-Received: Sat, 25-Jul-87 01:55:21 EDT References: <2698@crcge1.UUCP> Organization: Tektronix Inc., Beaverton, Or. Lines: 52 Keywords: LISP lazy evaluation reduction denotation quotation Summary: quote is syntax, not a function Xref: mnetor comp.lang.misc:567 comp.lang.lisp:350 In article <2698@crcge1.UUCP>, adams@crcge1.UUCP (Drew Adams) writes: > I don't know what (pure) LISP's operational semantics should be > called. If it weren't already in use we might consider the term > "denotational" to characterise its *operational* semantics, since the > built-in recognition of quotation provides the ability to distinguish > *different levels* of representation of meaning. QUOTE is a syntactic construct (as is LAMBDA). QUOTE is NOT a function. Under "normal" circumstances "(X Y)" means "look X and Y up in the current environment, and invoke X with Y as an argument". However, within special syntactic constructs (such as QUOTE and LAMBDA), it means something different. * In (LAMBDA (X Y) ...), the "(X Y)", certainly does not have the "normal" interpretation. * Similarly, in (QUOTE (X Y)), the "(X Y)" is interpreted differently. This has nothing to do with referential transparency. > Having such a denotation mechanism available in a language > facilitates a leveled view of things. However, it would seem that > most programmer use of quotation in LISP doesn't really involve > intentional semantic leveling. The most frequent uses of quotation > in LISP would appear to be: > > * to prevent the attempted evaluation of something which is > undefined, together with the ensuing error treatment > > * to prevent the immediate evaluation of a defined expression > because the moment isn't right. > ... > > In other words, QUOTE is mainly used by LISP programmers to offset > the eagerness of EVAL. No, QUOTE construct in LISP is basically a shorthand for making literal symbols and lists easier to write. Writing "(QUOTE A B C)" is more convenient than: (LIST (STRING->SYMBOL "A") (STRING->SYMBOL "B") (STRING->SYMBOL "C")) and has some "EQ" properties would require even more verbosity for the programmer to simulate. "Delaying" evaluation is generally better handled LAMBDA and application rather than QUOTE and EVAL. The problem is with EVAL, not with QUOTE. If you remove EVAL from the language, you have no problem with QUOTE. If you remove QUOTE from the language, but keep EVAL, you still have the same problems you would have had if QUOTE were in the language. Steve Vegdahl Computer Research Lab Tektronix Labs Beaverton, Oregon