Path: utzoo!attcan!uunet!mcsun!ukc!edcastle!aiai!jeff From: jeff@aiai.ed.ac.uk (Jeff Dalton) Newsgroups: comp.lang.lisp Subject: Re: Constants in code (Ex- Virtues of Lisp syntax) Message-ID: <3448@skye.ed.ac.uk> Date: 25 Sep 90 17:11:25 GMT References: <2863191137@ARTEMIS.cam.nist.gov> Reply-To: jeff@aiai.UUCP (Jeff Dalton) Organization: AIAI, University of Edinburgh, Scotland Lines: 22 I couldn't quite make out who wrote the stuff quoted below, so I decided to avoid the risk of misattribution by not attributing it to anyone. >> I would be unhappy if quote performed computation each time you used >> it! A very common idiom is to pass a quoted, uninterned symbol around >> as a marker in some structure. (I used to use '(())). This is the >> only way I can get a token I guarantee won't appear in my input >> stream! I always call LIST or CONS to get a unique object, rather than rely on anything that involves QUOTE, although some people have pointed out that, if you want an object that cannot appear in a stream, the stream itself will do (unless, thanks to #., the stream is held in a global variable). That is, you do something like: (with-open-stream (s ...) (do ((input (read s nil s) (read s nil s))) ((eq input s)) (process input))) -- Jeff