URLs: Why a backslash?

Well, yes, but there are already three slashes in the bit that you quoted that gets you to the server. OK the last one is optional, but surely the browser has to interpret at least the first two. These days, it seems, if you leave them out or use backslashes there instead, Firefox inserts slashes or changes back- to forward slashes on your behalf. (It really does not like it if you leave out the colon, though!)

Fortunately, many APIs allow the forward slash to be used in paths for Windows based files. “c:/new/test” will work just fine for specifying a Windows file in java, for instance. I’ve worked in commercial environments where this point had to be made to some people, who kept trying to special case their code to provide or translate backslashes if running on Windows when it wasn’t necessary. At most, you need to worry about it at the point where file syntax is shown through to the user - the Windows user may expect to see filenames with backslashes, and to input them with backslashes. Even there, the API will often help you - the java File object has a “getCanonicalPath()” which provide the name with the backslashes, however you chose to specify it (it will also provide the leading directory syntax if you specified it as a relative path, which may or may not be what you want).

He seems to be talking about the “http://” part at the start, though, which nobody has actually typed since about 2003.

The slashes within URLs, as in boards.straightdope.com**/sdmb/**newreply.php, are another matter.

Thank you. It drives me batty when people say “backslash” in URLs. IT’S NOT A BACKSLASH! QUIT SAYING THAT! I’ve heard people on TV read out URLs and say “backslash” and I want to reach into the TV and punch them.

Yeah, this is one of my peeves, when I hear broadcasters occasionally refer to the slash in a URL as a backslash. It’s a regular slash, people!

ETA: Evidently, I am blind or haven’t refreshed my browser in awhile. I see that OpalCat agrees.

Oh, but using the backward \ sets MS-DOS apart from UNIX (which uses the forward /) which is one way Bill Gates could distinguish his product from other existing ones.

Bob

That is maybe why it persisted, though I’m not sure why Microsoft would find it necessary to do so. But as mentioned above, it was more or less inherited from previous usage. CP/M used the backslash, and QDOS used it in imitation. Microsoft bought QDOS and turned it into MS-DOS, and at the time there was no compelling reason to change it.

Don’t get me started on the ones who say dash when they mean hyphen.

It drives me nuts when people read a URL and say “forward slash”. IT’S JUST A PLAIN SLASH, YOU DON’T NEED TO “FORWARD” IT. Mike Rowe used to do that at the end of Dirty Jobs when he was asking people to go to the website and suggest new jobs for him. I hate him for that, and it has nothing to do with the fact that every woman I know lusts after him.

I also blame Bill Gates for popularizing the backslash enough that people feel compelled to differentiate the forward slash.

Here’s a solution, we could borrow from the INTERCAL manual and call them “slat” and “backslat”.

Where? What version of CP/M had directories?

I work with a lot of non-technical, casual computer users, and it is imperative that I specify forward or backward slashes, or I will either get the wrong one used (where it matters) or the question will be asked. I like to head 'em off at the pass, nip it in the bud, so to speak.

The BBC does this by default, all the time, and it is astonishingly annoying. But better than when they used to say “stroke” instead.

My contribution to URL Pronunciation That I Find Irrationally Irritating would be the way some people say “www dot, acme dot, co dot, uk”, instead of “www, dot acme, dot co, dot uk”, the way it should be. That is, in speech they group the dot with what precedes it, not what follows it. I mean, back around the millennium we had the dotcom bubble, right? Not the “dot, com” bubble.

There was a old joke back in the 1990’s:

I heard that OJ Simpson now has an email address:

slash slash backslash, slash slash backslash escape

CP/M didn’t have hierarchical directories, as I recall. But it did have command switches that started with a normal slash (" dir /p "), and MS-DOS 1.0 followed suit (as yabob and Small Clanger have already stated).

So when the people at Microsoft wanted to add hierarchical file systems to MS-DOS 2.0 (to make hard drives more manageable) they chose the backslash to avoid parsing conflicts.

Right, AFAIK. It had “user areas.” Stupid idea.

I’m going to be twitching until the OP comes back and acknowledges that URLs don’t use a backslash.

The OP is Jinx. You’re going to be twitching forever.

AhhhahhhhhhhhH!!! twitch twitch

And to finish the story, they (the MS-DOS 2.0 developers) added the kind of hierarchical file system they did due to their experience with Xenix, which was Microsoft’s fairly successful Unix clone for the IBM PC. That wasn’t all the Unix they added to MS-DOS, either; a number of system calls were ported as well, to the extent you can port a Unix system call to MS-DOS. Essentially, the design of MS-DOS 2.0 was “Add as much Unix as you can to this CP/M clone without making it too big to fit on the target system or breaking too much existing software.” Using backslash instead of slash as the path separator was firmly in the “not breaking too much existing software” side of that design constraint.