News for hackers. Stuff that matters.
Re:Why Does Windows Use Backslash as Path Separator? by mardifoufs on Wednesday April 24, 2024 @06:07PM (#40150394)
Why is / better than \ ?
Re:Why Does Windows Use Backslash as Path Separator? by Alupis on Wednesday April 24, 2024 @06:11PM (#40150441)
For starters, `\` is used for escape sequences for just about everything... meaning you now have to do the `\\` dance everywhere you need to write this path separator.

Yes, it's true modern languages have things like `Path.separator` and stuff to abstract this away, but you cannot always use them in all contexts.

It's small friction that adds up to a sore bum after a while...

Re:Why Does Windows Use Backslash as Path Separator? by saurik on Wednesday April 24, 2024 @08:10PM (#40151572)
FWIW, I have never wanted to put a \ in a filename, but I have often wanted to put a / in a (pretty) filename, as / is used in standard English all the time; I then find myself using "-" instead and that makes me unhappy. I'd much rather have seen ^ as the escape character and \ as the path separator.
Re:Why Does Windows Use Backslash as Path Separator? by hollerith on Wednesday April 24, 2024 @08:12PM (#40151586)
You can put slashes in filenames in MacOS's Finder app. If you use ls to view the filename, you'll see colons where Finder shows slashes.
Re:Why Does Windows Use Backslash as Path Separator? by tracker1 on Wednesday April 24, 2024 @09:53PM (#40152419)
Want to really mess with someone, do that on a mac file share on a windows server... You won't be able to do anything to that file or directory from Windows. Not sure if it's still an issue, but definitely was in the NT4/Win2k days.
Re:Why Does Windows Use Backslash as Path Separator? by saurik on Friday April 26, 2024 @08:47AM (#40168784)
Yeah, because Mac used to : as the separator... but, : is also an extremely commonly-used character that I have off wanted to put in a filename.
Re:Why Does Windows Use Backslash as Path Separator? by Joe_Cool on Wednesday April 24, 2024 @06:24PM (#40150582)
The real fun starts with UNC paths. Is it `\\\\server\\share\ with\ space` or `//server/share\ with\ space` or any combination of those, preferably with quotes.
Re:Why Does Windows Use Backslash as Path Separator? by jz391 on Saturday April 27, 2024 @12:32PM (#40181231)
Could be worse of course: Multics (the first system with hierarchical names) used greater-than (>) as separator. Unix/DOS use of slashes gives us the sane pipeline/redirection syntax we all love (see [1] for the Multics redirection syntax).

[1] https://retrocomputing.stackexchange.com/questions/7030/why-...

Re:Why Does Windows Use Backslash as Path Separator? by OsrsNeedsf2P on Wednesday April 24, 2024 @06:10PM (#40150425)
Apart from the fact \ is used as an escape sequence?