4 ms·
yeah almost no one knows that forward slashes have been acceptable as path separators since (I wanna say) Win95. perhaps MSDOS.
by naikrovek 4y ago
yeah almost no one knows that forward slashes have been acceptable as path separators since (I wanna say) Win95. perhaps MSDOS.
- throwaway09223 4y agoIt actually predates MSDOS, and I believe dates back to PCDOS 2 when support for directories was first added.
- zwieback 4y agoI'd qualify that as "almost no non-programmers know". Forward slashes are so useful in languages that use \ as an escape sequence that most programmers do know this.
- layer8 4y agoIt doesn’t work everywhere. For example tab completion in cmd.exe doesn’t work for a path containing forward slashes (even when quoted), because forward slash is the prefix character for command-line options.
- naikrovek 4y agoright but that's a cmd.exe thing, not a Windows thing. Windows supports it, CMD doesn't. programs that you run from a CMD prompt support other options flag syntaxes, so it's just a cmd.exe feature. CMD.exe is its own thing with its own backwards compatibility requirements and the case could be made that cmd.exe is "Windows" as much as anything else is, so I get it.
- layer8 4y agoThe point is, you can’t just blindly use forward-slash as a file system path separator everywhere on Windows. It’s not on equal footing with backslash in that respect. As another example, you can’t use forward slashes in the File Open dialog of Visual Studio: https://developercommunity.visualstudio.com/t/allow-forward-slashes-in-file-paths-in-file-open-d/376371 https://developercommunity.visualstudio.com/t/allow-forward-...
- throwaway09223 4y agoThat's incorrect. You're confusing totally separate issues by examining specific pieces of software with product specific bugs. This isn't a valid way to examine the issue: by this metric, spaces aren't supported on unix because many programs choke on them. In fact, you can use forward slashes across the entire file API on Windows. That's the point.
- layer8 4y agoI'm viewing this from the end user's perspective. They can use backslashes everywhere as a path separator, but they can't use forward slashes everywhere. In that sense, forward slashes are in practice a second-class citizen on Windows. The canonical path syntax is and will remain with backslashes.
- chungy 4y agoSince MS-DOS 2.0.