3 ms·
Didn't Windows name "Program Files" with a space to force application developers to handle spaces in paths properly?
by curt15 2y ago
Didn't Windows name "Program Files" with a space to force application developers to handle spaces in paths properly?
- ape4 2y agoNot to mention C:\Program Files (x86)
- account42 2y agoAnd C:\Programme and other localized variants to force people to go through the proper APIs instead of hardcoding paths.
- pjmlp 2y agoIn theory yes, in practice to this day many people don't bother how to learn how to deal with pathnames in a proper way.
- inetknght 2y agoTop difficulties in computer science: 1. naming things 2. cache coherency 3. off-by-one errors ??? 4. quoting pathnames
- nneonneo 2y agoEh, maybe. In practice I usually do all my moderately-heavy filesystem scripting in Python these days, for which pathname quoting is just a complete non-issue. Of course, I still use a shell for quick-and-dirty stuff, but usually only for pretty simple tasks where the simplest quoting setup ("$i") suffices.
- hawski 2y agoI would replace 4 with parameter expansion rules.
- mmcdermott 2y agoFor the longest time you could get away with this in cmd: > dir c:\progra~1 So if forcing people to handle spaces was the goal, it took a long time to force it.
- arp242 2y agoI'm pretty sure that still works. I forgot the exact scenario, but my Windows CI on GitHub Actions output shorte~1 pathna~1 like that in a script just a few months ago. On one hand, the backwa~1 compati~1 is nice. On the other hand, there's just so much depreca~1 cruft that keeps popping up even on contemp~1 systems.
- InfiniteRand 2y agoI just got used to installing things I need to interact with in a program into a folder named C:\workspace