|
|
|
|
|
by humantorso
1659 days ago
|
|
I find it quiet funny there are a bunch of unix sysadmins in here talking about how PS isn't great, but admit to only touching it "sometimes" for some minor use case. Well, no shit. I now do cloud/unix/windows dev and formerly used to admin both types and use both bash and PS and have to say I like PS better, only because the community around it is less toxic and does not gatekeep. From actual REPL language POV though, PS serves its purpose quiet well and I look forward to where it takes us in the future. |
|
Takes care of the parsing and makes pipelines less brittle for sure (just look at things like NO_COLOR [0] that are basically "please adopt this so we can stop having to add endless edge cases to strip ansi color codes") because it keeps data flowing between programs into a machine-friendly format. It's only when it reaches a human that it is formatted for a human to see.
Then when you peel off the surface you realize you can invoke C# directly from the shell. That's right, either you can import any C# .dll out there and call it from the shell or flat out write C# in your script and have Powershell execute it at runtime [2]. You can add syntaxic sugar to make your dll easier to work with but any C# dll can be called from powershell.
As a side effect, this means that if you have a front-end/back-end app with the back-end written in C#, you also have a (bad) scripting interface basically for free.
[0] https://no-color.org/
[2] https://tekcookie.com/use-c-in-powershell/