pathnames [Re: files, printers, etc. [Re: The feel of a Lisp
4 May 97 17:48:26 -0700
I highly recommend staying within the limitations of the language when
designing things like pathnames. Assuming Common LISP as a reasonable
base, let's go over some basics -
Sorry, but I do only partially agree with this.
ANSI-CL has a reasonably good pathname design, still rooted in the
LispM style: host, device, directory, filename, file-extension, file
version. I'm often fighting with Unix because of this, since extension
and version have no meaning in Unix, and they are interpreted by
CL as "implementation specific" issues. Probably most of
pathname design in CL is good, but I do not fear to have to change
in order to provide more independence from platform issues.
2) CL has a reasonable, standardized pathname system that it independent
of the underlying OS. Extending it past the local machine, to cover
URLS, etc... should not be hard.
One thing was far better on LispM than in ANSI CL was the total
flexibility of pathnames. They where well defined structures,
and extending them was incredibly trivial. I actually did it a
couple of times, once to provide FTP capabilities with the Mac,
and once to enable multiple LMFS partitioning (mounting and
dismounting) simulating a new kind of underlying file-system.
2) symbols are evaluated and interned in packages. Think long and hard
before you use them as a basic part of your pathnames.
3) Period is a basic syntactic form, used to construct a dotted pair (a
cons cell). If you think any LISP programmer is going to let you take
that away, you are sorely mistaken.
Instead of re-inventing the wheel all over again, try to leverage as
much as you can. I recommend looking at CL-HTTP - it's an excellent,
very well-written, very powerful program. It's also an example of good
LISP style. Merging URLs from CL-HTTP and pathnames from ANSI Common
LISP, with a few extensions to cover local objects like printers,
should cover just about all your path needs VERY nicely.
I fully agree with these. The only point is that ANSI-CL pathnames
have probably to be twisted just a little bit, in order to do a
better and seamless merging.
> -----Original Message-----
> From: Alaric B. Williams
> [ snip ]
> Ok, here's how I'd do it.
> A pathname is a symbol list, identifying an object in the user
> namespace. Any user-level object; printer, file, directory, system,
> user, etc.
> Now, all pathnames start from the global root - the set of all hosts
> on an Internet system. EG:
> [ snip ]
> - . referring to the CWD
> ((.) Hello!)