3 ms·
> If you want strong typing (are you scripting in the large?), then, almost by definition, no scripting language provides that. Powershell is basically strongl
by majkinetor 6y ago
> If you want strong typing (are you scripting in the large?), then, almost by definition, no scripting language provides that.
Powershell is basically strongly typed.
> Can you be more specific than "fatigue"? That sounds like ennui
I love my job, but bash makes me wanna hang myself. I can say the same about stored procedures. Its like going back to cobol days. Some people have strong tastes I guess.
- diroussel 6y agoI used “true” instead of “$True” in a power shell script. It didn’t error. It didn’t warn. It just evaluated to false. So doesn’t behave like a strongly typed language to me.
- majkinetor 6y agoRTFM - if you don't specify type, it is infered. [bool] $x = "true" MetadataError: Cannot convert value "System.String" to type "System.Boolean". Boolean parameters accept only Boolean values and numbers, such as $True, $False, 1 or 0.
- JohnL4 6y agoYeah, i forgot to add my thoughts on PowerShell. It's great for Windows and nothing else. Its power isn't syntax (which is a bit weird) but the fact that it interfaces with all the Windows APIs. I can't really imagine it on any other platform. If you're on Windows and nowhere else, PS is superior to bash. Have you been using bash on Windows? If so, why? Cross-Platform?
- majkinetor 6y agoPS is superior to bash, period, no matter platform. You are talking about something else entirely, like added benefit of lots of Windows tools supporting PowerShell automation. While that is nice, the major appeal of pwsh for me is not the ecosystem but the paradigm and language - in bash, you always do something irrelevant to your current task as anything requires excessive boilerplate and all supportive utilities are reinventing stuff like parameter names and parsing, error handling, etc. Also, those utilities are sometimes different on other *nix platforms, so you can't even count on linux portability. So yeah, PowerShell is huge on Windows and just awesome on Linux. You must also take into account that its only few years old in that space.
- jen20 6y ago> PS is superior to bash, period, no matter platform Simply untrue. See [1]. PS _may_ be superior _where it exists_, but without question it is available in far fewer places than bash. [1]: https://github.com/PowerShell/PowerShell/issues/12612 https://github.com/PowerShell/PowerShell/issues/12612