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

Re: Issue: PATHNAME-SYNTAX-ERROR-TIME (Version 1)



    Date: Fri, 22 Jul 88 11:02:08 MDT
    From: sandra%cdr@cs.utah.edu (Sandra J Loosemore)

    Of the options presented for this issue, I prefer
    PATHNAME-SYNTAX-ERROR-TIME:PATHNAME-CREATION.  The NAMESTRING-COERCION
    option seems like it is really the wrong time, and I would rather not
    leave it EXPLICITLY-VAGUE.

I favor PATHNAME-SYNTAX-ERROR-TIME:PATHNAME-CREATION also.

    However, I would really like to see something completely different --
    namely adding a keyword argument to TRUENAME to allow it to be used
    for explicit syntax checking of filenames without signalling an error
    if the file doesn't exist.  Functions such as OPEN and the ones in
    sections 23.3, 23.4, and 23.5 that actually pass pathnames to the host
    file system would be required to (implictly or explicitly) perform the
    same checking. 

    This would also solve a problem I brought up some time ago, that I was
    having with Lucid Lisp under VMS.  I had defined a logical name like
    LISP$LIBRARY that expanded into something that included a directory
    specifier in its expansion, like disk$login:[loosemore.lisp.library].
    However, I was getting things like

	(namestring (merge-pathnames 
			(pathname "[loosemore]foo.bar")
			(pathname "lisp$library:")))

    =>  "lisp$library:[loosemore]foo.bar"

    which the file system naturally barfed on when I tried to open the
    file.  The problem was that Lucid's PATHNAME function was treating the
    logical name like a device specification instead of expanding it.
    TRUENAME would have expanded the logical name for me, but since
    LISP$LIBRARY was not a complete pathname for an existing file, it
    would also have signalled an error.

I know of no Common Lisp implementation for VMS that doesn't have this
problem.  It's a strange thing about VMS that foo: sometimes implies
a directory and sometimes doesn't, and there's no syntactic way to tell.

I think your suggested extension to TRUENAME is a reasonable way to
cope with this oddity of VMS, and perhaps similar oddities of other
operating systems (although I can't think of any right now).  How about
writing it up as a proposal?