Hacker News new | ask | show | jobs
by dahauns 74 days ago
I certainly won't argue that pwsh is even close to perfect, but...obtuse is just about the most unfitting description of powershell. It offers a level of structure and consistency that is - even with all its shortcomings - orders of magnitude above the wild west of the daily reality of the linux cli.

Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess.

1 comments

"Just because it's the mess we are all intimately familiar with, doesn't make it less of a mess." I kinda feel like you could apply the statement more to powershell tho.

I just dont see how Remove-Item is superior to rm and thats just the first example that came to mind (Atleast there are aliases for most stuff afaik so i guess its not AS bad).

I also just googled and there seem to be 3-4 different commands (not including the aliases) that do EXACTLY the same thing, atleast the Microsoft article used 1:1 the same description for all of them.

I'm not sure what argument you are trying to make with picking out a single command and vaguely asserting doubt.

It's about having a high degree of systematization and standardization and detailed guidelines around command structure and behaviour. The same with parameter naming and handling. About actually being able to work with typed data at input/output/pipes instead of only raw bytes, with all the benefits that entails (and a "standard library" of cmdlets/modules liberally making use of that). And so on. Having the whole .NET runtime available as a first-class citizen if needed is a nice bonus as well.

Don't mistake lack of familiarity for obtuseness.

rm only removes files and directories right? Remove-Item can be used for any powershell provider, such as environment variables, active directory, certificates, and registry. And of course you can implement your own providers that utilize *-item cmdlets. I don't know that i'd call either superior, or that i'd even say that they're equivalent. rm is a utility for removing files, remove-item is a little more than that.