home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!think.com!barmar
- From: barmar@think.com (Barry Margolin)
- Newsgroups: comp.lang.lisp
- Subject: Re: *READ-SUPPRESS* and #P syntax
- Date: 11 Nov 1992 17:33:48 GMT
- Organization: Thinking Machines Corporation, Cambridge MA, USA
- Lines: 50
- Message-ID: <1drg5sINNco0@early-bird.think.com>
- References: <1992Nov11.014902.6585@kronos.arc.nasa.gov>
- NNTP-Posting-Host: telecaster.think.com
-
- In article <1992Nov11.014902.6585@kronos.arc.nasa.gov> philpot@kepler.arc.nasa.gov (Andrew Philpot) writes:
- >Should *READ-SUPPRESS* be obeyed when reading literal pathnames using
- >#P?
-
- I think it's a reasonable suggestion. Please submit it as a public review
- comment.
-
- >One would imagine that the intent of using READ-SUPPRESS to implement
- >the *FEATURES* idea was to avoid signaling errors associated with just
- >this kind of implementation-specific extension.
-
- Note that *READ-SUPPRESS* can't possibly satisfy all syntax portability
- problems. As you've discovered, it can only help when the
- implementation-specific syntax satisfies the expectations of those of us
- specifying *READ-SUPPRESS*. When *READ-SUPPRESS* is true, the reader still
- has to be able to parse expressions sufficiently to skip over them.
-
- >However, strictly speaking, this behavior is allowed by pp. 522 ff. of
- >CLtL2. It appears that the appropriate section of the new dpAns spec
- >agrees with CLtl2 in this matter. I couldn't swear I got to the right
- >section, but there was one in dict-reader.tex that mirrored 22.1.2
- >pretty well, and I didn't find any reference to #P there.
-
- Basically, the problem is that when we added #P syntax we never updated
- *READ-SUPPRESS*. The definition of #P is that it's followed by a string,
- not an expression.
-
- >Is it the intent of dpAns that
- >
- > (defvar my-path
- > #+EXCL #P(:type "lisp")
- > #+LUCID #P".lisp"
- > )
- >
- >can cause an error?
-
- As currently written, yes. I think it was the original intent of #+ to
- allow this kind of code, though.
-
- Of course, you can always work around this by calling MAKE-PATHNAME rather
- than using a pathname literal:
-
- (defvar my-path
- #+EXCL (make-pathname :type "lisp")
- #+lucid #p".lisp")
- --
- Barry Margolin
- System Manager, Thinking Machines Corp.
-
- barmar@think.com {uunet,harvard}!think!barmar
-