home *** CD-ROM | disk | FTP | other *** search
- Xref: sparky comp.lang.lisp:2899 comp.lang.scheme:2603
- Path: sparky!uunet!ukma!usenet.ins.cwru.edu!agate!anarres.CS.Berkeley.EDU!bh
- From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
- Newsgroups: comp.lang.lisp,comp.lang.scheme
- Subject: Re: Quote syntax
- Date: 17 Nov 1992 22:48:21 GMT
- Organization: University of California, Berkeley
- Lines: 19
- Message-ID: <1ebsrlINNppi@agate.berkeley.edu>
- References: <Bxvq8r.E38@beach.csulb.edu>
- NNTP-Posting-Host: anarres.cs.berkeley.edu
-
- werts@aardvark.cecs.csulb.edu (Michael Werts) writes:
- >In the design of Lisp was there a profound reason for using
- > (QUOTE (+ 1 1)) or '(+ 1 1)
- >to inhibit evaluation instead of something like
- > [+ 1 1] ?
-
- Yes, the reason is that the Lisp notation allows a Lisp program to be
- readable as Lisp data. That is, (quote (+ 1 1)) is just an ordinary
- Lisp list, so a Lisp program can read and manipulate it. It's really
- the same reason that you say (f x) and not f(x) -- the Lisp way makes
- an expression readable as a list.
-
- The notation '... is just an abbreviation for (quote ...) and is
- converted to the latter form when read.
-
- It would have been possible, I suppose, to make [...] abbreviate
- quoting, but would [...] mean (quote (...)) or (quote ...)? You
- want a uniform notation that can quote symbols as well as lists.
- If [+ 1 1] quotes (+ 1 1), how do you quote +?
-