7 ms·
As long as you bear in mind that it's main purpose is a usable replacement for the CMD.EXE batch language, then you should be willing to forgive Powershell it's
by AimHere 10y ago
As long as you bear in mind that it's main purpose is a usable replacement for the CMD.EXE batch language, then you should be willing to forgive Powershell it's warts.
- wvenable 10y agoExcept that they added a bunch of new warts that don't have any relation to CMD.EXE. They took the opportunity to re-invent how a shell works from the strongly-typed object perspective but then they copied some of terrible syntax of 40 year old unix shells. I just don't understand it. I'd rather write scripts in pure C#.
- emodendroket 10y agoThe point of PowerShell isn't just to write scripts but to work as an interactive shell.
- wvenable 10y agoI'm not at all convinced that the syntax is any better for typing in as commands in an interactive shell.
- emodendroket 10y agoI think it works pretty well for that beyond the weird omission of anything like &&
- wvenable 10y agoIt works fine as an interactive shell but that's not exactly high praise. It could be better for that and for scripting but instead tries to be more familiar to bash users. As a bash user, I'm terribly happy about it's syntax either but it's the price to pay for 40 years of backwards compatibility. Powershell has no such excuse.
- emodendroket 10y agoTrue enough.
- Senji 10y agoIt sorely needs an && and a &
- JeffreySnover 10y agoThat is not quite right. At the end of the day it is all about automation. But we took the position that the way Admins automate is by scripting the things that they do in an interactive shell. Bruce Payette had a great way of saying it - he said that the lifecycle of 99% of scripts starts at the prompt and ends at the carriage return. Then, somethings you want to codify things so you put it into a script. Then as the function becomes more used and more important, you want to make it more and more formal without having to throw everything away and start with a new language. So YES and interactive shell is important but it is important as a stepping stone to automation. That is the PowerShell mindset. Jeffrey Snover [MSFT]
- lucb1e 10y agoThat is not quite right either. I enter about 200 commands on a normal workday and write maybe two scripts a month in a shell language. A shell language should be a shell language, it's not merely a stepping stone to write a script after using a command just once. If that's what I'm looking for I'll use Python. And from the other side, Python would be a terrible shell (by default), and that's fine because that's not what it's used for. If Powershell is made for both, it has to make compromises both as a shell language and as a scripting language. This is one of the things that annoy me about the Windows ecosystem: it ships with no languages beyond a shell, which makes scripting for it very annoying, and you can't even install a language of choice via a package manager (one has to go find a download somewhere on the web).
- omaranto 10y agoI thought Windows shipped with .NET which includes a command line C# compiler, csc.exe.
- ygra 10y agoThe current C# compiler is no longer distributed as part of .NET. They're separate again (as is MSBuild).
- aeorgnoieang 10y ago
- cptskippy 10y agoI would hope it's also meant to put vbscript out to pasture as well.