3 ms·
PowerShell fully disregards the POSIX paradigm (good), and has forged its own path in the world of shells. - one shell does almost everything, rather than havi
by delta_p_delta_x 4y ago
PowerShell fully disregards the POSIX paradigm (good), and has forged its own path in the world of shells.
- one shell does almost everything, rather than having a million different utilities with their own input/output formats
- everything is not a bag of bytes, or a bunch of text to be parsed; outputs are objects with queryable structure
- comes with a massive standard library, even without .NET
- straightforward, (mostly) sane syntax, thoroughly different from `sh` and descendants
I must say, for all the criticism levelled against it, Microsoft has a penchant for creating really useful and unique programming languages and tools, or at least building on existing tools and improving them. C#, F#, .NET, PowerShell, TypeScript, VS Code, VS. And six out of these seven are now cross-platform and open-source.
- deafpolygon 4y agoI agree with your points. > PowerShell fully disregards the POSIX paradigm I agree that it's good. Why do you think people are still entrenched into mode of thinking these days? Better tooling has switched over to node (NPM) and Python (pip) for anything more complicated than 50 lines.
- delta_p_delta_x 4y ago> Why do you think people are still entrenched into mode of thinking these days? I dunno. Familiarity? I mainly use Windows because it's what I've used for 23 years, even though I have a dedicated SSD to Linux. Maybe for many people, it's not worth unlearning decades of muscle memory and re-learning PS just so they can get object-oriented shell scripting.
- benj111 4y ago>outputs are objects with queryable structure I've often wondered how far you could get with a table based text structure in POSIX land. Things like awk can deal with that already. Its backwards compatible if you ignore the first line.
- deafpolygon 4y agoPS natively deals with JSON, which is nice. Something awk would melt down trying to parse. it comes in handy when querying REST APIs https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/invoke-restmethod?view=powershell-7.3 https://learn.microsoft.com/en-us/powershell/module/microsof...