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

Re: Issue: PATHNAME-LOGICAL (version 2)

    Date: Wed, 24 May 89 16:40 EDT
    From: David A. Moon <Moon@STONY-BROOK.SCRC.Symbolics.COM>
    I noticed Coral (Macintosh Allegro Common Lisp) has a logical pathname
    feature which is somewhat simpler but aimed at solving the same problems.
    In particular your feature only affects the directory component and does
    not allow wildcard mapping, only one-to-one mapping.  Should we say
    something about this in the current practice section?

Right, we have logical directory names, to simplify access to sets of files in
differently named directories (an especially severe problem on micros where
everybody just has to have a different pet name for their hard disk).  This
isn't really the same as simplifying access to different file systems,
although of course solving the latter automatically solves the former.

						   We thought about this but
    no matter what syntax we choose it's going to be a conflict for

Well, it seems like this particular choice conflicts with just about everybody
(except unix), so maybe it's worth considering alternatives...

    I could make the alternate argument that the use of colon fits really
    nicely into the Macintosh environment, where hd: means the hard disk,
    carry: means the floppy disk used for taking stuff between machines, and
    pcl: means the logical disk with PCL on it.  Does that make sense to

Unfortunately, another very common convention (among the better-organized
types, I guess) is for the floppy used to carry pcl-related stuff between
machines to be called pcl:.

What I'm really concerned about is users finding that loading up pcl "breaks
the file system" because they can no longer open files on their pcl: floppy.
This sort of thing might be less of an issue for lisp machines, where users
tend to live entirely in the lisp machine world and so are more willing to
grant first-class status to lisp-defined conventions.  I think on a Mac users
would expect "real" file names to take precedence over any logical names
internal to Lisp.

						      might be considered
    poor in the standard since ! is one of the characters that Common Lisp
    has been careful not to use for anything and leave for the users.

But users don't get to do anything with the pathname syntax - they more
or less have to take what the implementation/OS gives them.  So this
isn't really taking anything away from users.

But be that as it may, how about '|'?  Or '\' (a.k.a. '\\')?

What I think is needed here is a character which is not special in any (or
most) file systems.  I.e. it should either be unused (i.e. illegal) or be a
legal (but unusual) filename constituent.  The problem with ":" is that it is
a special character in far too many file systems, so it results in an
unresolvable conflict between the logical and physical interpretation.  When
the character is a constituent, users can state their intent by either quoting
or not quoting it.  Of course "quoting" is implementation dependent, but
that's ok, because the only time you need to quote it is when specifying an
implementation-depend namestring.  I'd rather give up a single character
(which can be easily documented) than have this vague situation where what
happens depends entirely on the current set of logical hosts, and there is no
way to specify a physical filename.

    The other thing we could do is not standardize logical pathname
    namestrings at all, but require some other construct to be used, perhaps
    a make-pathname call or a new function (logical-pathname "string").  I
    think that would be very ugly and I'd like to avoid it.

Why would it be ugly?  Would it still be ugly if there was a reader macro