Re: Re: More pathname madness with #p""

Raymond Toy <[email protected]> Thu, 01 Sep 2005 12:18:56 -0400
Newsgroups gmane.lisp.steel-bank.devel,gmane.lisp.cmucl.devel,gmane.lisp.cmucl.general,gmane.lisp.openmcl.bugs,gmane.lisp.gcl.devel
Message-ID <[email protected]>
>>>>> "Fare" == Far  <Far> writes:

    Fare> On 31/08/05, Todd Sabin <[email protected]> wrote:
    >> So an implementation should
    >> never give you a pathname with (:relative) as the directory component,
    >> and it seems perfectly legal for implementations to say that
    >> (make-pathname :directory '(:relative)) is either illegal, or means
    >> the same as (make-pathname :directory nil).
    Fare> That sounds like a plausible interpretation, if indeed there is no
    Fare> usage rule that distinguishes a directory NIL from a directory
    Fare> '(:RELATIVE). But then, because of the read-write similarity
    Fare> requirement, the canonicalization should happen within MAKE-PATHNAME,
    Fare> that should either refuse '(:RELATIVE) and issue an error or (perhaps
    Fare> more helpful to the user) check for it and canonicalize to NIL.

If it's allowed for make-pathname to do these kinds of manipulations,
I think this is what we should do.

Another interesting case is (make-pathname :directory '(:relative
"/")).  This is printed as #p"//".  "/" is an illegal component, so I
think make-pathname should produce a warning or an error.  Likewise
for (make-pathname :directory '(:absolute "abc/def")).

I have a patch to do this, but I need to do some testing.

Ray



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf