From: Sam Steingold
Subject: Re: *print-readably* is messy
Date: 
Message-ID: <u8zke8p3b.fsf_-_@xchange.com>
> * In message <···············@world.std.com>
> * On the subject of "Re: *print-readably* and printing numbers"
> * Sent on Thu, 3 May 2001 03:47:02 GMT
> * Honorable Kent M Pitman <······@world.std.com> writes:
>
> I think *print-readably* was added toward the last minute and there
> wasn't really a good understanding/consensus of what its impact is or
> should be.  That's why it's vague.

Aha!!!  This clears things up!

One of the more confusing issues in the spec is pathname printing.
(see <http://clisp.sourceforge.net/impnotes.html#pathprint>)

Issue 276 PRINT-READABLY-BEHAVIOR:CLARIFY prescribes #p"" format which
is clearly ambiguous ( #p".bashrc" may be #.(make-pathname :type
"bashrc") or #.(make-pathname :name ".bashrc")).

OTOH, there is a clear and unambiguous #s(pathname) format in several
places in the CLHS:

HyperSpec/Body/fun_namestrin_h-namestring.html:

  (setq q (make-pathname :host "kathy" 
                         :directory 
                           (pathname-directory *default-pathname-defaults*)
                         :name "getty")) 
=> #S(PATHNAME :HOST "kathy" :DEVICE NIL :DIRECTORY directory-name 
       :NAME "getty" :TYPE NIL :VERSION NIL)


HyperSpec/Body/fun_parse-namestring.html

(setq q (parse-namestring "test"))  
=> #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY NIL :NAME "test" 
       :TYPE NIL :VERSION NIL)
(parse-namestring "test") 
=> #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY NIL :NAME "test"
       :TYPE NIL :VERSION NIL), 4
 (setq s (open xxx)) => #<Input File Stream...>
(parse-namestring s) 
=> #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY NIL :NAME xxx 
       :TYPE NIL :VERSION NIL), 0
 (parse-namestring "test" nil nil :start 2 :end 4 )
 => #S(PATHNAME ...), 15

HyperSpec/Body/fun_pathnamep.html
 (setq q (pathname "test"))
=> #S(PATHNAME :HOST NIL :DEVICE NIL :DIRECTORY NIL :NAME "test" :TYPE NIL
       :VERSION NIL)

I wonder why this #s(pathname...) syntax was not made the readable format?

-- 
Sam Steingold (http://www.podval.org/~sds)
You think Oedipus had a problem -- Adam was Eve's mother.
From: Kent M Pitman
Subject: Re: *print-readably* is messy
Date: 
Message-ID: <sfwvgniqxll.fsf@world.std.com>
Sam Steingold <···@gnu.org> writes:

> I wonder why this #s(pathname...) syntax was not made the readable format?

I proposed it, but I think maybe too late.  (We "feature froze" in
1988, if I recall, and finished in 1994, and published in 1995.)
There was a BIG gap in there where any number of good ideas were
canned for being "too late".  A few features were added after 1988 if
there was really pressing need, but mostly it was only bug fixes.
Pity no one thought the inability to print readably in numerous
contexts was not a bug fix, but maybe that was my failure to make a
good case.  In fairness, this would have required a lot of detail work
identifying names for things that didn't have names.  [See the examples
for *print-readably* and the remarks about hash tables.  Knowing whether
to call an array's storage :contents or :storage or whatever, etc. is an
issue.]