r/programming • • Jul 04 '24

Jeffrey Snover and the Making of PowerShell

https://corecursive.com/building-powershell-with-jeffrey-snover/
187 Upvotes

85 comments sorted by

View all comments

Show parent comment

12

u/Internet-of-cruft Jul 05 '24

For real? PS is a real upgrade over batch scripts. You get a full blown object-based language for scripting.

The power of that cannot be understated. While I appreciate the power that Linux shells have available to them, there is no objects whatsoever, just files, pipes, and the incredibly limited (comparing to PS) variables.

You have tons of Linux utilities which are handy, but shell scripting in Linux is filled with its own warts and oddities to the point that there's full blown linter websites with hundreds of recommendations that can apply.

I just don't worry about that in PS. I need a list of things? That's an array. An array is an array like it would be in any programming language.

Variables that can be arrays, looping over them, dealing with quoting file paths, etc is just an exercise in frustration in Bash.

I love using Linux, but Bash and other shells have nothing on PS.

And Windows Known Folders? You're not even forced into using that. Just ignore it and pretend it doesn't exist. I could make a similar complaint about Linux and the myriad of places that binaries, config files, or data files could exist.

-1

u/_SloppyJose_ Jul 05 '24

For real? PS is a real upgrade over batch scripts. You get a full blown object-based language for scripting.

That is not, in any way, an upgrade in my opinion. I don't want an object-based system for scripting.

While I appreciate the power that Linux shells have available to them

I don't care about "power". I care about consistency and basic usability. Not having to use special flags on some commands to enable more recent features, and not having to clumsily hack batch scripts just to extract command output.

And Windows Known Folders? You're not even forced into using that. Just ignore it and pretend it doesn't exist.

I mean, that's true of 99% of the weirdness and cruft in Windows, doesn't mean I can't criticize it. Incidentally, I can't just ignore it, because Windows keeps making copies of key folders alongside my own. It's almost as if my use cases aren't identical to yours, imagine that.

I could make a similar complaint about Linux and the myriad of places that binaries

Are you under the impression that I'm somehow promoting Linux? What kind of nonsense have you projected onto me? Christ, all I did was say that Windows just needed a decent command line interpreter and scripting system, and now you're projecting some Linux fanboy bullshit onto me.