> Is it?  You cannot have slashes in filenames, no matter what (that's a
> decision Plan B should lift by representing, as I believe Rob Pike
> recommended, paths as arrays of strings rather than slash delimited
> strings).

this is not a serious limitation.  your suggestion to use an array of char*
would be equivalent to saying use \0 as the path delimiter.  now paths are
not compatable with other strings used by the c library.  as i understand
your suggestion, you would encode /env/fn#upas/fs as

        \0env\0fn#upas\0fs\0\0

(there's a bug as / and '' would both be encoded as \0\0. i think this is
a fundamental problem because \0 is overloaded as the path seperator
and the end-of-string marker.)

when passed in to a program as argv[n].  such an encoding would
be required to preserve compatablity between other strings and
paths.

how would you expect to type a path at the shell prompt?

even if you turn this into an array of char* inside a program,
strings would now not be type-compatable with paths.  

do you have a reference for rob suggesting this?

- erik

Reply via email to