[Openmcl-devel] A platform independent pathname without truename
rpgoldman at sift.info
Fri Jul 29 21:55:44 CDT 2011
On 7/29/11 Jul 29 -5:23 PM, Gary Byers wrote:
> LOGICAL-PATHNAMEs are CL's way of trying to treat pathnames in a
> platform-independent way. That's a fairly ambitious goal, and it
> was even more ambitious 20-25 years ago (when CL was being designed
> and when people regularly used a wider variety of filesystems than
> they do to today, where it's basically "(modern) Windows, UNIX variants,
> and very little else")
> It's probably true that there are enough differences between
> implementations and filesystems that LOGICAL-PATHNAMEs don't fully
> achieve that goal: people who write large systems that run on several
> CL platforms still have to conditionalize some code, but they might be
> able to keep that conditionalization localized and it'd probably be a
> lot harder to maintain those systems if LOGICAL-PATHNAMEs didn't exist.
> Being able to say:
> ? (ensure-directories-exist "ccl:newdir;")
> and letting the system deal with the physical pathnames is probably a
> lot simpler than the alternatives.
> [I'm not 100% sure that this is what you were asking, either.]
I always find that sooner or later I want to reference a pathname that
has underscores in it, spaces, or something that otherwise breaks the
rules of logical pathnames (which I can never adequately remember).
Sooner or later TRANSLATE-LOGICAL-PATHNAME goes pear-shaped and I rack
my brains, then remember that I have done something bad again. After
that I find that the trouble I took to work with logical pathnames is
all wasted, and rue my lot....
So now I try to just avoid the bloody things in favor of unix-style
pathname strings, which seem to work everywhere as a de facto
standard... And I just use #+ to make sure I get either "/home" or
"/Users" as appropriate....
More information about the Openmcl-devel