[Tutor] slashes in paths

Steve Willoughby steve at alchemy.com
Sun Jul 21 02:24:12 CEST 2013


On 20-Jul-2013, at 16:37, Jim Mooney <cybervigilante at gmail.com> wrote:
> If only Bill Gates hadn't chosen '\', which is awkward to type and
> hard to make compatible - but I think he figured his wonderful DOS
> would be a Unix-killer, reign supreme, and there would be no
> compatibility problem. All I can say to that is, "thank God for
> competition."  ;')

If I recall correctly, the earliest versions of DOS (which supported directories) allowed you to configure your environment to use / as a directory separator so you could really use A:/path/to/directory for things.  That wasn't the default since, if I were to guess, they had already adopted the use of "/" to introduce command-line switches which was the existing syntax on systems like CP/M and various DEC operating systems of the same era, so it would be ambiguous as to whether "foo/bar" referred to a file "bar" in the directory "foo" or the file "foo" with a "/bar" switch applied to its usage.

Having already burned that bridge, flipping the slash the other way to \ for directory separators probably seemed like a good compromise at the time.  In hindsight, I think it would have been better to just make a clean break at some early point and just change to "/" for directories, but that's never quite as easy to see as the right move at the time.

I'm just glad they didn't start out using the VMS-style directory syntax or our paths would look like $DISK:[foo.bar.baz]file.ext;2



More information about the Tutor mailing list