Why does Windows really use backslash as path separator?
More or less anyone using modern PCs has to wonder: why does Windows use backslash as a path separator when the rest of the world uses forward slash? The clear intermediate answer is “because DOS and OS/2 used backslash”. Both Windows 9x and NT were directly or indirectly derived from DOS and OS/2, and certainly inherited much of the DOS cultural landscape. That, of course, is not much of an answer. The obvious next question is, why did DOS use backslash as a path separator? When DOS 2.0 added support for hierarchical directory structure, it was more than a little influenced by UNIX (or perhaps more specifically XENIX), and using the forward slash as a path separator would have been the logical choice. That’s what everyone can agree on. Beyond that, things get a bit muddled. A fascinating bit of sleuthing, and the author comes to an interesting theory. What’s fascinating to me is that I don’t even consciously realise the MS-DOS is the odd one out here – I just adapt t查看全文