News for hackers. Stuff that matters.
Re:Rumors of Cmd’s death have been greatly exaggerated by Too on Thursday January 05, 2017 @12:56PM (#13329504)
So essentially it's a programming language? For "scripting", why would I use it over just plain c#?
Re:Rumors of Cmd’s death have been greatly exaggerated by WorldMaker on Thursday January 05, 2017 @05:40PM (#13332123)
It's about like asking why would you use F# or (Iron)Python over C#? Different syntaxes have different strengths/weaknesses and the trade-offs can target different use cases and needs. At the end of the day it's whatever makes you (feel) productive.

In terms of specifics, PowerShell's strengths over C# for scripting are particularly in PowerShell's the ability to succinctly navigate hierarchies (folders, but also other folder-like trees) in a way reminiscent of shells from time immemorial, as well as to easily interleave native binary calls (and pipes/redirects/captures).

Some of it is the difference between grabbing C# binding for libgit off NuGet, LINQing my way through a the git DAG for the information I need versus running `git show xyz` or `git describe` directly in a shell and capturing that into a variable or piping that to whatever my next steps are. Depending on my level of abstraction and how often that script is called and if I'm paid to write that script or it is getting in the way of what I'm actually trying to work on, I use a different tool for the job.

Re:Rumors of Cmd’s death have been greatly exaggerated by paulmooreparks on Thursday January 05, 2017 @03:27PM (#13331044)
Because C# is designed around application development, whereas the PowerShell scripting language is designed around scripting and its peculiarities.