|
|
|
|
|
by noodletheworld
386 days ago
|
|
It is reasonably unlikely that bash scripts are easily replaceable by powershell scripts. Theres a fair argument that complex scripts require a complex scripting language, but you have to have a good reason to pick powershell. Typically, on non-windows, there is not one. Its the same “tier” as bash; the thing you use because its there and then reach past for hard things. The same reason as bash. Theres no realistic situation I would (and Ive written a lot of powershell) go, “gee, this bash script/makefile is too big and complex, lets rewrite it in powershell!” |
|
I think PowerShell was totally right to call this out and do it better, even though I don't particularly love the try-catch style of exception handling. False is not an error condition, exceptions are typed, exceptions have messages, etc.
The problem with PowerShell coming from bash etc. is that the authors took one look at Unix shells and ran away screaming. So features that were in the Bourne shell since the late 1970s are missing and the syntax is drastically different for anything non-trivial. Other problems like treating everything as UTF-16 and otherwise mishandling non-PowerShell commands have gotten better though.