6 ms·
Given that Microsoft are going to "continuous deployment" with Win10, I think they ought to have taken the opportunity to do one last breaking change, possibly
by pjc50 11y ago
Given that Microsoft are going to "continuous deployment" with Win10, I think they ought to have taken the opportunity to do one last breaking change, possibly behind an install-time option or compatibility layer: ditch the CP/M legacy.
That is, change the path separator to '/', ditch the drive letters, and the magic file names like CON, and the 8.3 names.
It sounds like a huge breaking change but code that is already using the shell path functions https://msdn.microsoft.com/en-us/library/windows/desktop/bb773559%28v=vs.85%29.aspx https://msdn.microsoft.com/en-us/library/windows/desktop/bb7... would work transparently.
- acdha 11y agoI'd expect that this will happen for Metro apps first – those are all modern and since most of them are supposed to run on e.g. ARM anyway legacy code compatibility matters considerably less. I'd be surprised if they changed the path separator but the device filenames and FAT-compatible short names seem worth doing for security alone.
- WalterGR 11y agochange the path separator to '/' I believe that the Windows API supports '/' as a path separator and that it's user mode apps that tend not to. I can't find a good citation for that, though.
- acdha 11y agoThis stuff is a thicket of special cases: “File I/O functions in the Windows API convert "/" to "\" as part of converting the name to an NT-style name, except when using the "\\?\" prefix as detailed in the following sections.” https://msdn.microsoft.com/en-us/library/windows/desktop/aa365247%28v=vs.85%29.aspx?f=255&MSPPError=-2147217396 https://msdn.microsoft.com/en-us/library/windows/desktop/aa3...
- WalterGR 11y agoThis stuff is a thicket of special cases: Is it? That's the only special case I find on that page. Are there specific API functions that have other special cases?
- acdha 11y agoI was thinking of the special device names, unicode and length handling depending on whether you use \\?\ – that's the best way to write safe code except when it isn't: “Many but not all file I/O APIs support "\\?\"; you should look at the reference topic for each API to be sure.”
- pjc50 11y agoThe DOS command line uses '/' to deliniate arguments. So I've just realised that that would have to change, a more serious problem.
- stephengillie 11y agoI vaguely remember something about MS coders already using / to delineate arguments and \ for file paths; when they realized UNIX used \ for that function and they'd have to interoperate over a network, it was already too late.
- WalterGR 11y agoI don't think it was about networking, necessarily. Here are a couple references: http://superuser.com/questions/176388/why-does-windows-use-backslashes-for-paths-and-unix-forward-slashes http://superuser.com/questions/176388/why-does-windows-use-b... MS-DOS 1.0 (which did not support directories at all) was already using / to introduce command-line options. It took this usage of / from CP/M, which took it from VMS. http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432386.aspx http://blogs.msdn.com/b/larryosterman/archive/2005/06/24/432... goes into more detail.
- WalterGR 11y agoSupport for / as a path separator exists for some built-in commands, but it's very spotty. For example: E:>cd ./work/depot/code E:\Work\depot\code>cd / The syntax of the command is incorrect. E:\Work\depot\code>cd e:/ E:>dir / Invalid switch - "". E:>dir ./ Invalid switch - "". E:>dir e:/ Invalid switch - "".
- ynik 11y agoMost built-in commands will accept / if you put the path in quotes: c:\>dir "d:/" Volume in drive D is HDD ... This is quite useful when writing cross-platform makefiles :)
- 11y ago