3 ms·
Can you be more specific than "fatigue"? That sounds like ennui, in which case maybe consider a job switch instead of a language switch (not being sarcastic or
by JohnL4 6y ago
Can you be more specific than "fatigue"? That sounds like ennui, in which case maybe consider a job switch instead of a language switch (not being sarcastic or intentionally mean). Bash plus all the Unix tools (awk, grep, sed, tsort, comm, the ones I don't know, etc.) have pretty long legs, in terms of functionality and the syntax is pretty understandable. They provide most of what Perl offers, apart from OO (-ish) and line noise.
If you want strong typing (are you scripting in the large?), then, almost by definition, no scripting language provides that. If you need performance, switch to a compiled language (or a jit-compiled interpreted language) that most of your co-workers understand.
If Python brings too many dependencies, I guess you're trying to do something that is way out of the realm of possibility for bash, so you're not looking for an "alternative" to bash, you're looking for the best language for whatever project you're undertaking. And you may not be able to get away from the dependencies if you're trying something specific/sophisticated.
- 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