8 ms·
Look, I’ve written a lot of powershell, and I don’t mind it at all, but its not surprising at all to me. Powershell isn’t in the same problem domain as rust/go
by wokwokwok 4y ago
Look, I’ve written a lot of powershell, and I don’t mind it at all, but its not surprising at all to me.
Powershell isn’t in the same problem domain as rust/go/Scala/python.
The niche it fills is “calling windows apis from c++” or, more recently, c#.
It’s less effort than that, so it’s useful, on windows.
It is not less effort than using say, a bash script on other platforms because it:
- does not provide unique access to proprietary windows apis (they don’t exist)
- is not installed by default
- does not conform to any standards other than it’s own
- no package manager that works
The question you should ask is: why given that, would you, given that you must install something, choose to install and use powershell instead of python?
There’s no reason. You’d have to specifically like powershell to bother.
Most people don’t care enough to be bothered. Surprise level: 0.
- frogger8 4y agoPerfectly stated! Powershell is fantastic…for windows.
- Macha 4y agoAlso if you look at interactive shells, which have the lower bar to people trying them out (as seen by fish, nushell, etc. picking up users in recent years), powershell is actually quite clunky as an interactive shell. It doesn't appear to have completions matching those shells, the command names are quite tedious for those that don't have built in unix-y aliases, it doesn't provide a facility for common shell shortcuts like "run this one command with a modified environment", etc.
- juki 4y ago> It doesn't appear to have completions matching those shells What kind of completions do you mean? PowerShell has completion for commands, parameter names and arguments. You can define arbitrary script blocks to do custom completion (or for simple cases just use `ValidateSet`). They can be defined either in the script/function itself, or separately with `Register-ArgumentCompleter` (that also works for non-PowerShell programs).
- Macha 4y agoIn fish, if I type ls -<tab>, I get a history based autocomplete suggestion (ls -l), and also a summary of options with brief descriptions: ls -l -1 (List one entry per line) -A --almost-all (Show hidden except . and ..) -a --all (Show hidden) -B --ignore-backups (Ignore files ending with ~) …and 51 more rows I can use the arrow keys to cycle into the "and more rows section, or type further to narrow the list. zsh supports similar. In Powershell, if I type Get-ChildItem -<tab> It just cycles through options apparently abitrarily. The first suggestion is "-Path", and it offers no facility to provide explanatory information.
- juki 4y agoIf you use `Set-PSReadLineKeyHandler -Key Tab -Function MenuComplete` it will show the options and the types of the arguments, but yeah, I don't think there is a completion function available that orders them based on history or shows the docstrings. In principle there isn't anything that would stop one from making that. PowerShell has history info available, and help messages/docstrings can be given for parameters (`Get-Help command -full` will show them if available).
- Siira 4y agoPowershell is a shell. Shells don’t do package management. Do you mean sth like ZSH plugin installers?
- digisign 4y ago+ telemetry-spewing ms products give some of us the willies.
- jiggawatts 4y ago"Here is a revolutionary new thing that does everything better." "No it doesn't, because it's not exactly like the thing that I am used to. In fact, it doesn't have solutions for the limitations it eliminates! Poor." I heard the same arguments when, for example, SolidWorks with its true construcive solid geometry (CSG) 3D modelling swept away the old 2D "electronic paper" tools such as AutoCAD. The old guys complained in exactly the same way. "What if I just want to draw the outline by hand? SolidWorks is terrible at that!". "Umm... it can draw arbitrary cross-sections automatically in seconds!" "Yes, but I can't control things the way that I'm used to!" Etc...
- pas 4y agoPS is a far cry from Ammonite (a Scala-based scripting package/environment/thing, with an easy deployment one-liner, easy access to allll of the Java ecosystem packages, compile time type checks, and so on) Passing objects by default is a nice idea to enhance pipes... but how about going beyond pipes? :)