4 ms·
I don't see a tremendous amount of accumulated wisdom in Powershell. It may be newer, but I'm not sure they looked at prior art or had design members who were
by ldiracdelta 10y ago
I don't see a tremendous amount of accumulated wisdom in Powershell. It may be newer, but I'm not sure they looked at prior art or had design members who were shell gurus in any other shell than `cmd.exe`, which is a horrific shell. Why are commands horrendously long in powershell? If you spend time in the shell, you don't want your fingers falling off due to overuse. Aside... one of the design decisions Microsoft took that absolutely blows my mind is using `\` for file hierarchies instead of `/` when you're writing an operating system in C!
- cstross 10y ago> Aside... one of the design decisions Microsoft took that absolutely blows my mind is using `\` for file hierarchies instead of `/` That decision goes back to MS-DOS 2.11, circa 1983. (DOS 1.0 didn't have subdirectories.) The model for DOS directories came from UNIX, which at that time was the very aggressively defended intellectual property of AT&T. As Microsoft was an AT&T licensee -- for Xenix, their version of AT&T System 7 UNIX, which was Microsoft's vision of the future of operating systems when PCs became powerful enough: they licensed it in 1978 and resold it via OEMs -- I speculate that they were afraid that AT&T might sue them for patent or copyright violation relating to the filesystem design if they went with a forward slash.
- pseudalopex 10y agoThey used \ for directories because most DOS programs used / for switches. https://blogs.msdn.microsoft.com/larryosterman/2005/06/24/why-is-the-dos-path-character/ https://blogs.msdn.microsoft.com/larryosterman/2005/06/24/wh...
- JeffreySnover 10y agoInteresting hypothesis! I'll ask Bill the next time I see him. Jeffrey Snover[MSFT]
- jaykru 10y agoThere are many (*nix-inspired) aliases for frequently used commands though. I think PowerShell's preference for verbosity is a strength more than a deficit. Why "grep" when select-string "sls" is so much more intuitive and promotes readability.
- JeffreySnover 10y agoThere are lots of aliases for cmdlets for exactly this reason - interactive use. The verbose commands are useful when reading a script that isn't working at 3am in the morning when your boss is breathing down your neck to fix it "stat!". RE - your aside '\' vs '/' - I think most of us still shake our head at that decision. Jeffrey Snover [MSFT]
- xl 10y agoI don't know if that was really a "decision" or an unfortunate compromise. DOS inherited /foo style command line parameters from CP/M, and DOS 1 didn't have a hierarchical file system, so there was no conflict with the path delimiter character UNIX was using. When DOS 2 introduced directories (and brought over the cd, md, rd, etc. commands from UNIX) suddenly we had to choose between massively breaking backwards compatibility or using something else, like \, as a delimiter.
- yread 10y ago> using `\` for file hierarchies instead of `/` You know you can use both since like XP, right? You can even mix them up in one path which can look quite confusing c:/windows\system32/etc/drivers\
- ldiracdelta 10y ago`/` is not a first class citizen. You encounter different oddities throughout the windows environment in the shell and external utilities when you use `/`.