4 ms·
When you open Explorer and click in the address bar - what path separator is displayed? How about when you install software - what path separator does it show?
by Alupis 3y ago
When you open Explorer and click in the address bar - what path separator is displayed? How about when you install software - what path separator does it show?
> Win32 file APIs can actually use either '/' or '\\' as a path separator.
Fantastic - so why are we still entertaining this idiotic file separator everywhere within the OS itself?
> '\\' was selected by DOS, specifically DOS 2.0 per TFA, before OS/2 existed
Fine - so why the hell are we still doing things like a dead, defunct OS did and literally nobody else did because, you know, it was unintelligent?
- asveikau 3y ago> Fantastic - so why are we still entertaining this idiotic file separator everywhere within the OS itself? Dude, why are you so angry about what direction a slash goes? Once they introduced the ability to use either one, they still had a lot of software that hardcoded '\\', including lots of their own. Again, they support either one in most places. The backslash is considered more canonical because it came first. Going back to DOS for a second, TFA even says Microsoft wanted to use '/' in DOS 2.0 when they introduced directories (1983), but IBM objected.
- Alupis 3y agoIBM objected in 1983 - yet that decision lives on today? It's what Windows displays to users, even if you can actually type in / and things still work. When Microsoft wrote IIS and other web technologies the internal friction of path separators must have been fun to experience. "Why are we still using \ again, Jim? Oh, that's right, we chose poorly a decade ago and for some reason can't be bothered to fix it!" > Dude, why are you so angry about what direction a slash goes? Because it's rubbed my bum raw over the years and I've finally had enough! I mostly jest... but seriously, it's super annoying to deal with and a constant reminder of the poor decision making Microsoft products often encompass.
- foobarian 3y agoYou know what happens when you write a \ --> / converter? You get the python2 to python3 migration mess. Except with Windows it would have been millions of mom and pop shops left out in the lurch.
- Alupis 3y agoNo it wouldn't - because Microsoft did write a \ -> / converter and none of this bad stuff happened. Microsoft just chooses to still display \ to you in the UI... which is ridiculous and perpetuates \ living on in all user-facing places.
- foobarian 3y agoAre we arguing different things? I.e. removing support for \ altogether from anywhere in the OS vs. not showing it in UIs? I personally like the latter but it's a matter of taste I guess :-). It gives me warm and fuzzies to see C:\ D:\ etc. live on.
- asveikau 3y agoParsing a URI should not be a straight pass to open(2) [or CreateFile in Windows parlance] to get to the filesystem directly anyway ... Think of the security problems with that, or URIs where they don't actually correspond to filesystem objects. So, IIS already needs to parse the path distinctly. I'm going to say it didn't cause them a lot of trouble. Note also that Windows tends to use 16 bit Unicode everywhere, that's probably a bigger thing for IIS than the path separator.
- nullindividual 3y agoMicrosoft was very smart to use the backslash. It lead to unrivaled backwards compatibility. Saying it was the wrong choice is simply revisionist history.
- Alupis 3y agoSo, we would lose all backwards compatibility by writing a \ -> / converter? I don't buy this logic at all - in fact, as others have pointed out, Windows will accept both separators these days. You are, unintentionally, being the very sort of apologist my post above complained about.
- naikrovek 3y agoI think you just need to get over whatever is making you angry. Non-POSIX systems exist, dude. It’s ok for things to exist…
- asveikau 3y agoTempted to bring in the fact that classic Mac used colons as a path separator. As TFA says it wasn't clear yet that unix would be so dominant. Also, a lot of these systems were introducing the concept of directories for the first time in their history. That's how old we're talking. That directories are novel to some people at that point.
- deleted 3y ago[deleted]
- nullindividual 3y agoPersonal attacks are not welcome on HN. Microsoft wrote a 'converter'. Terminal, Explorer, and other applications recognize "/" and convert it to "\". If it takes both, it doesn't matter which one is "real".
- lproven 3y ago> You are, unintentionally, being the very sort of apologist my post above complained about. Hint: the post you are replying to is humorous and the tone should be read as sarcastic.
- Capricorn2481 3y ago> Fine - so why the hell are we still doing things like a dead, defunct OS did and literally nobody else did because, you know, it was unintelligent? Nobody is doing it except the people using cmd.exe over Windows Terminal or Powershell. If you're using a DOS terminal you're gonna get DOS results.