News for hackers. Stuff that matters.
Re:Jeffrey Snower was originally demoted over PowerShell by einpoklum on Sunday May 08, 2022 @06:43AM (#31302895)
But instead of coming up with PS, it would have been pretty straightforward to just install bash on Windows. Someone chose to go the PS way rather than the bash way. My question is what the reason was for making this choice.

> Nobody except Linux-first FOSS authors

Bourne shell and its predecessors and successors are traditional and common on most computer systems since the early 1970s (starting with the Thompson shell in 1971; see: https://en.wikipedia.org/wiki/Unix_shell )

so, I would argue actually the other way around. "Everybody except Windows-only closed-source authors would expect people to have bash or similar shell working." The question is, why go for PS instead of adopting a regular shell.

Re:Jeffrey Snower was originally demoted over PowerShell by jodrellblank on Sunday May 08, 2022 @04:31PM (#31307874)
J. Snover started out bringing Unix (VMS) shell to Windows, and it isn't a good fit. Everything isn't text and so the Unix shell tools are pretty limited. So they made something which is a good fit for Windows everything-is-an-API instead.

> "The question is, why go for PS instead of adopting a regular shell."

The question is, why stick with 1970s stuff when you can have progress?

Re:Jeffrey Snower was originally demoted over PowerShell by Arnavion on Sunday May 08, 2022 @06:54AM (#31302952)
I'm really not sure what your point is.

>Someone chose to go the PS way rather than the bash way.

Are you asking about users or the Microsoft employees who work on Windows? Users don't want to install either bash or PS, which is why before PS existed all scripts were written for cmd.exe which was guaranteed to be available. Microsoft employees would have no benefit from adding bash to Windows given its license, and PS integrates better with the OS anyway. The author of PS is already on record that one of the original reasons was to integrate better with WMI etc [1]; given how hard / impossible it is to munge the output of ls etc in bash it should be no surprise than an object-based shell with saner expansion rules works better.

>> Nobody except Linux-first FOSS authors

>Bourne shell and its predecessors and successors are [...]

You don't have to give me a history lesson. What you said has nothing to do with the fact that the only people who expected Windows users to have bash were Linux software authors, because their software only supported being built by bash scripts (and required make, configure, perl, what have you). Windows software itself, whether open or closed source, was built using cmd.exe scripts or VS project files.

[1]: https://stackoverflow.com/a/573861/545475

Re:Jeffrey Snower was originally demoted over PowerShell by raverbashing on Sunday May 08, 2022 @07:29AM (#31303108)
Let's be real honest here, bash sucks.

"common on most computer systems since the early 1970s" yes, that's exactly the problem, it still thinks spaces on filenames are an "exception", just as a start. It knows about lines but barely.

PS has native json support.

Re:Jeffrey Snower was originally demoted over PowerShell by sidpatil on Sunday May 08, 2022 @10:15AM (#31304186)
> most computer systems since the early 1970s

How are you defining "most"? Back in those days there was much more diversity in the computing landscape.

Re:Jeffrey Snower was originally demoted over PowerShell by x0n on Sunday May 08, 2022 @05:23PM (#31308258)
Simply because on Unix, configuration is text files; bash and the gnu utils work with text. In Windows, it's an API driven O/S; powershell uses objects, but will coerce output to strings to allow text parsing if needed.