A bad example: VAX/VMS
Unfortunately, not everyone chooses naming conventions in accord with these guidelines. On VAX/VMS our canonical file might be called UCBVAX::SYS$DISK:[ROB.BIN]CAT_V.EXE;13. The VMS file naming scheme provides a distinct syntax for each level in the name: UCBVAX:: is a machine; SYS$DISK: is a disk (actually a macro that expands to a disk name such as DUA0:); [ROB.BIN] is a directory; CAT_V is a file ‘base’ name; .EXE is a file ‘type’; and ;13 is a version number.
Although this syntax may seem unnecessarily cumbersome, it has a precedent: it is analogous to expressions in programming languages. Consider a C expression such as *structure[index].field->ptr. If * were postfix and / the only dereferencing operator, the expression might be written structure/index/field/ptr/. Functionally-minded programmers might use the notation contents(ptr(field(index(structure)))). (A single character cannot be used in C because it could not distinguish X[Y] and X->Y, with X a structure pointer and Y an integer or structure element respectively, but this ambiguity could be eliminated in a different language.) C and VMS use syntax to distinguish the types of the components of a name. Instead, the UNIX file system deliberately hides the distinctions. Aside from the obvious advantages such as simplicity of syntax and the usurping of only a single character, the uniformity also makes the name space easier to manipulate: the mount system call aliases a disk and a directory.
A curious parallel between program expressions and file paths
A curious parallel between program expressions and file paths
I was just re-reading The Hideous Name by Rob Pike and P.J. Weinberger. I've been undecided about the uniform paths recommended by the paper, but I was surprised when the paper made a parallel between the "bad example" of VAX/VMS and C syntax expressions. I was especially surprised because I have independently found I prefer the uniform expression syntax of Forth, corresponding more closely to the uniform paths of Unix.
Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
Re: A curious parallel between program expressions and file paths
That is a very astute observation. Of course, Haskell has uniform syntax at every level, so what do Haskell devs do? Invent new operators so everything looks different again.
Carpe diem!
Re: A curious parallel between program expressions and file paths
Thanks! And yeah

Kaph — a modular OS intended to be easy and fun to administer and code for.
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie
"May wisdom, fun, and the greater good shine forth in all your work." — Leo Brodie