home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / lang / lisp / 2851 < prev    next >
Encoding:
Text File  |  1992-11-11  |  2.2 KB  |  62 lines

  1. Path: sparky!uunet!think.com!barmar
  2. From: barmar@think.com (Barry Margolin)
  3. Newsgroups: comp.lang.lisp
  4. Subject: Re: *READ-SUPPRESS* and #P syntax
  5. Date: 11 Nov 1992 17:33:48 GMT
  6. Organization: Thinking Machines Corporation, Cambridge MA, USA
  7. Lines: 50
  8. Message-ID: <1drg5sINNco0@early-bird.think.com>
  9. References: <1992Nov11.014902.6585@kronos.arc.nasa.gov>
  10. NNTP-Posting-Host: telecaster.think.com
  11.  
  12. In article <1992Nov11.014902.6585@kronos.arc.nasa.gov> philpot@kepler.arc.nasa.gov (Andrew Philpot) writes:
  13. >Should *READ-SUPPRESS* be obeyed when reading literal pathnames using
  14. >#P?
  15.  
  16. I think it's a reasonable suggestion.  Please submit it as a public review
  17. comment.
  18.  
  19. >One would imagine that the intent of using READ-SUPPRESS to implement
  20. >the *FEATURES* idea was to avoid signaling errors associated with just
  21. >this kind of implementation-specific extension.
  22.  
  23. Note that *READ-SUPPRESS* can't possibly satisfy all syntax portability
  24. problems.  As you've discovered, it can only help when the
  25. implementation-specific syntax satisfies the expectations of those of us
  26. specifying *READ-SUPPRESS*.  When *READ-SUPPRESS* is true, the reader still
  27. has to be able to parse expressions sufficiently to skip over them.
  28.  
  29. >However, strictly speaking, this behavior is allowed by pp. 522 ff. of
  30. >CLtL2.  It appears that the appropriate section of the new dpAns spec
  31. >agrees with CLtl2 in this matter.  I couldn't swear I got to the right
  32. >section, but there was one in dict-reader.tex that mirrored 22.1.2
  33. >pretty well, and I didn't find any reference to #P there.
  34.  
  35. Basically, the problem is that when we added #P syntax we never updated
  36. *READ-SUPPRESS*.  The definition of #P is that it's followed by a string,
  37. not an expression.
  38.  
  39. >Is it the intent of dpAns that
  40. >
  41. >  (defvar my-path
  42. >      #+EXCL #P(:type "lisp")
  43. >      #+LUCID #P".lisp"
  44. >      )
  45. >
  46. >can cause an error?
  47.  
  48. As currently written, yes.  I think it was the original intent of #+ to
  49. allow this kind of code, though.
  50.  
  51. Of course, you can always work around this by calling MAKE-PATHNAME rather
  52. than using a pathname literal:
  53.  
  54. (defvar my-path
  55.   #+EXCL (make-pathname :type "lisp")
  56.   #+lucid #p".lisp")
  57. -- 
  58. Barry Margolin
  59. System Manager, Thinking Machines Corp.
  60.  
  61. barmar@think.com          {uunet,harvard}!think!barmar
  62.