pathnames [Re: files, printers, etc. [Re: The feel of a Lisp

Adam Alpern alpern@ns2.brightware.com
Thu, 8 May 1997 16:52:27 -0700



Alaric B. Williams:
;; (*employees* 'pictures #(picture of Lionel))
;; (*employees* 'names "Lionel B. Snell")
;; (*employees* 'surname "Snell"

;; Those are source code. My syntax is designed as what the user types in - 

Trust me - if that's a syntax for an end-user (i.e. NOT a lisp
programmer), users won't want to go anywhere near the machine.

An end-user is not going to be able to make sense out of that - they
don't want to know LISP quoting rules, and they probably don't want to
know LISP syntax at all.

Michael Travers' PhD thesis (url at the bottom of this message)
describes a hierarchical object system called LiveWorld (based on
Framer) in which objects are refered to by paths. The syntax looks
much like UNIX-style pathnames, but it refers to objects by name
instead. In that system, your example would look roughly like:

#/employees/Snell/surname
#/employees/LionelBSnell/picture

Alaric B. Williams:
;; I abandoned that syntax. Now, I'd write:
;; (*cwd* 'file 'file)
;; using normal quoting for literal symbols, and taking all other symbols
;; as binding references to things like CWDs. 

Again, end-users don't want to know arcane things like quoting
rules. If not, it's generally not a good idea to break the uniformity
of lisp syntax. What you propose sounds like you're going to have a
separate reader and evaluator just for pathnames! Very
confusing. Better would be to implement pathname parsing with a reader
macro and keep things integrated. You DON'T want to have the
evaluation rules for symbols vary though. There lies much confusion.

the Common LISP reader macro character for pathnames is P - how about
we use R to mean "Reference (to an object)". Then we could have

#R"/employees/by-surname/Snell".

Better yet, don't make them type paths at all. Write an integrated
file system/OOFS/POS/Object browser with drag and drop. I almost never
type paths by hand anymore in my everyday computer usage.

Alaric B. Williams:
;; They are just one path to the object. Since we're just using symbols
;; to access things, I'm assuming that we're using an underlying filer
;; architecture that just binds symbolic names to stuff. 'Public 'Hello!
;; may be one path to the object containing my text used to greet new friends,
;; but "'Private 'Work-in-progress 'Publications 'NewUserHello" may be another.

Y'see, I've been trying to tell you that this is bad - we've already
got something that binds symbolic names to stuff and it's called
LISP. Don't re-invent the wheel, and don't make something that looks
just like a wheel, but is in reality a phone book.