[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue: PATHNAME-STREAM



Issue:		PATHNAME-STREAM

Status:		New issue, but easy to agree on

References:   	PATHNAME (p.413), also the introductory text right above
		it on the same page.
		Derived references: PARSE-NAMESTRING (p.414),
		MERGE-PATHNAMES (p.415), PATHNAME-HOST etc. (p.417),
		OPEN (p.418), WITH-OPEN-FILE (p.422),
		RENAME-FILE (p.423), DELETE-FILE (p.424)

Category:     	CHANGE/CLARIFICATION

Problem Description:

The PATHNAME function as documented in CLtL is impossible to implement.
The book says that a stream can be used as an argument and converted to
a pathname, but pathnames only name files, not other sources or sinks
of data that streams might be connected to.

Proposal PATHNAME-STREAM:FILES-ONLY:

Specify that if a stream is used as a pathname, it must be a stream
that is or was open to a file.

Rationale:

This is probably what the designers of Common Lisp intended.
This is the only thing that can be implemented without large changes to
the language such as extending pathnames to things other than files. 

Current Practice:

Some systems signal an error if a non-file stream is used as a pathname.
Others may do something else, but since the proposal is to define this
to be "is an error", current practice seems irrelevant.

Adoption Cost:

Since I didn't say "signals an error", no implementations need change.

Benefits: Description of pathname functions will make more sense.

Conversion Cost: None.

Aesthetics: Makes language a little cleaner.

Discussion: None yet.