Christophe Rhodes writes:
> Pascal Bourguignon <pjb@...> writes:
> > http://www.lisp.org/HyperSpec/Body/fun_pathname-match-p.html
> > says that DIRECTORY should consider a missing type and version in th=
> > pathspec as :wild:
> > pathname-match-p returns true if pathname matches wildcard,
> > otherwise nil. The matching rules are implementation-defined but
> > should be consistent with directory. Missing components of wildcard
> > default to :wild.
> > (Of course, one may wonder the rational for having the specification=
> > of DIRECTORY written on the page for PATHNAME-MATCH-P, that's CLHS!)
> One can read this paragraph in two ways. If the full stop after
> "directory" had been a semicolon, it would favour your interpretation,
> as it would logically join the two sentences "The matching rules..."
> and "Missing components..."; since it is a full stop, I'd argue (not
> too strongly, but still) that the two sentences are unconnected; one
> says that the matching rules for PATHNAME-MATCH-P must be consistent
> with those for DIRECTORY; and one says that for PATHNAME-MATCH-P,
> missing components default to :WILD.
The first sentence says: behavior of DIRECTORY =3D behavior of PATHNAME-M=
The second sentence says: behavior of PATHNAME-MATCH-P is that missing=20
components default to :WILD.
It seems to me that the intend is to have the reader to deduce that
the behavior of DIRECTORY be the same, that is that there too missing
components default to :WILD.
> Now, it might well be that the behaviour you expect is better
> behaviour, and it might even get implemented (eventually); so the
> point I'm making here is to highlight the possible alternative
> interpretation, because I don't think that the behaviour that you want
> is /mandated/. In other words, if you want the directory of
> everything, be sure to set those components you want to be wild to
> :WILD yourself.
<personal rant about Common-Lisp>
That's not the point. (But that is a problem with the Common-Lisp
Specification in general). The interest of a standard language
specification is to have implementation behaving the same. The fact
that the implementations differ on these points (not marked as
implementation dependent, and the less implementation depend points
the better), only show that the standard is badly worded, (to express
it nicely). (Otherwise, they could as well written the whole
Common-Lisp standard in one sentence:=20
Any implementation of lisp that behave like commercial
implementation #1, commercial implementation #2 and commercial
implementation #3 is a conformant implementation of Common-Lisp,
and any program that can run on either one of these commmercial
implementation is a conformant Common-Lisp program.
At least, that's how it feels sometimes with the Common-Lisp
</personal rant about Common-Lisp>
But in any case, I feel that in the case of
DIRECTORY/MATCH-PATHNAME-P, the wanted behavior is clear, and SBCL
does not implement the same matching rules in DIRECTORY and in
Do not adjust your mind, there is a fault in reality.