[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Issue: PATHNAME-STREAM (Version 4)
- To: Masinter.pa@Xerox.COM
- Subject: Re: Issue: PATHNAME-STREAM (Version 4)
- From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
- Date: Fri, 23 Oct 87 14:35 EDT
- Cc: CL-Cleanup@SAIL.STANFORD.EDU
- In-reply-to: <871009-140723-1578@Xerox>
- Line-fold: No
Date: 9 Oct 87 14:07 PDT
> Oh, also, a synonym stream whose target is an acceptable stream is
also acceptable, right?
I think not.
I think you're wrong here. I think the PATHNAME operation should pass
through to the target of a synonym stream, just as the STREAM-ELEMENT-TYPE
I think the idea is to push the specification described by
the language on p. 417 ("The pathname argument may be a pathname, a
string or symbol, or a stream that is or was open to a file") back to
cover more generally all of the functions in CL which take pathname
arguments, rather than the weaker specification of p. 413 ("Any argument
called pathname in this manual may actually be a pathname, a string or
symbol, or a stream.")
I agree with that. The question is precisely what "is open to a file"
means, and I think it includes synonym streams.
If you hand a stream to a function that expects a pathname, does it
coerce it to (pathname stream) or to (truename stream)?
The former. That's what p.417, which you like, says.
What is the difference between (pathname x) and (parse-namestring x)?
parse-namestring has more features.
What are the constraints that (pathname stream) has to follow, e.g., if
you do an open the result, should the stream have the same data?
I don't think we can ascribe any particular semantics to files in Common Lisp.
The reason why synonym streams are suspect is that I presume that
(pathname stream) should be time invarant, e.g., you should get the same
pathname given the same stream no matter when you execute it. Following
synonym streams would violate that invarant.
Is it "the same" stream if you change the variable that a synonym stream
indirects through? Not clear. I don't buy this argument. I much
prefer the argument that the only definition of synonym streams that I
can find (CLtL p.329) says "Any operations on the new stream ..." and
does not say anything about exceptions. Also earlier on the page the
phrase "synonym streams that pass all operations on" is used. It would
be hard to be more unambiguous than this, although of course no one
knows what "operations" really means exactly.