Hacker News new | past | comments | ask | show | jobs | submit login

DOS originally had no directories.

When they were added Microsoft could have chosen to put special devices in their own directory (eg C:\dev on each device, or reserved D: for devices, or any number of other schemes). Instead they decided to make these special device names be implicit members of every directory on every drive.

Similar to make treating whitespace as significant, the decision to be compatible with the relatively few existing users doomed many, many more users in the future to endless problems. Backwards compatibility has a non-zero cost to users too!




It's a bit before my time, but I imagine that would have broken comparability with some CP/M programs that wouldn't be aware of the concept of directories and would look in cwd. Given the era we're talking about, that seems like it'd actually be a pretty big deal. Until relatively recently, Microsoft was big on backward compatibility and it was probably a pretty significant factor in their rise to dominance.


As Raymon Chen explains the compatibility is not with CP/M but with an idiom that people still use today, namely of assuming that one can redirect to/from devices like NUL without a path prefix. There's an awful lot of existing practice that does this and doco that says that this is what to do.

Random example: Here are SuperUser answers written this year, only a few months ago, employing this idiom.

* https://superuser.com/questions/1293489/


On CP/M, device names ended with ":". To me, it'd be perfectly reasonable to treat "LPT:" as a magical file present in any directory, but not "AUX" or, much worse, "aux.c", which doesn't look like a device name. Besides that, "AUX:" was never a thing in CP/M IIRC.

That doesn't convince me they actually thought this through at the time.


They still are big on backwards compatibility




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: