Ugh. Sorry, I've not really got anything constructive (destructive?) to say in support of that other than (a) in practical terms it isn't a transferrable skill beyond Windows, (b) the Naming-Conventions-OfThings is both awful and verbose, and (c) I've never had a use case where more than a handful (at most) of my fellow devs would be happy to work with it in the future.
YMMV and I appreciate this is very much a personal opinion.
Basics works everywhere. In my personal experience I often found myself in a situation where I'm spending a lot of time wrestling with *nix shell (especially finding workarounds for the differences between Debian/Ubuntu and RH/CentOS/Rocky) instead of spending 5 minutes on PS script which would would everywhere, just supply the distro specific paths.
b) not a problem in the real life. Come on, you don't sprn you time writing the paths, you just TAB them - same thing with PS, except it works on cmdlet names AND their parameters, out of the box, on any platform. Ubuntu has it now by default (for some supported things), RH-like - not.
c) well they probably had a more familiar to them tool on their hands already
YMMV, of course, but the thing is what you are being constructive here, with explicitly stating things you don't kno2 or understand.
[0] and there are Py modules for that too, but they are not the part of the default install too
> explicitly stating things you don't kno2 or understand
I've done Windows development since 3.1 (and .Net since 2001) so in that time I've written a lot of PowerShell. I'm not offering uninformed second-hand opinions.
For (a) I'd argue that the lack of adoption outside Windows makes it de-facto not really a transferrable skill, even though it does run elsewhere. For (b) so what if it is easy to autocomplete? It doesn't make it any less ugly/verbose. For (c) yes, that was exactly my point. Stuff needs to be maintainable, and if fellow devs have other more familiar tooling then using that tooling is usually more appropriate.
If PowerShell is for you, great. I don't feel the need to convince you otherwise; in your situation maybe it is. But sometimes a difference of opinion is just that - a difference of opinion, and not ignorance of the subject matter.
If you want to only write/use PS - then probably, but... if this is yours environment - you chose the tools, if it's not - the overall concepts and workflow doesn't differs too much, especially for Python.
I had an unpleasant experience of rewriting a Python 2 script to Python 3. At some point I just said "fuck it" and rewrote it, from scratch, on Linux, with .NET SNMP library - and I got a working script in an hour, compared to 3 days of headache with a known good Py2 script which I only needed to adapt to Py3.
The difference was in the quirks of Python (especially on strong typing and indentation), not in the program flow.
Later I finished rewriting it in Py3 but the overall experience of writing in Python left a sour taste.
A person who would start with PS could easily adapt to Python (or honestly any other language) if he would understand how the things work - and PS allows, IMNSHO, that in a quick and easy way.
But if someone just copy-paste the code from SE - does it matters if that happens in Python or PS?
> so what if it is easy to autocomplete? It doesn't make it any less ugly/verbose
LOL, "I need a PL what is easy for a beginner, so I would NOT recommend an explicitly verbose language for that!"?
a) easiness of autocomplete allows the discoverability of the options. Just a simple Ctrl+Space offers all the options of a cmdlet (conveniently listing them with the precedence used by the author, leaving all the automatic shit added by cmdletbinding() at the end) and this alone helps tremendously with writing. I don't keep all the things, options and parameters in my head (and I don't want to) and a beginner doesn't know them in the first place.
Most of the time I just write something and see if the are means to do what I want through the autocompletion of parameters and cmdlets. If I don't see the appropriate things or they don't work as I expect them to work - only then I consult with manual. If in your opinion nobody should write a single LOC without a couple of hours in the docs...
b) I often hear about how the verboseness of PS as bad thing, but... honestly, IMO, it doesn't matter, it's not THAT verbose as Java, it's not full of obscure and senseless abbreviations and names (especially compared to Linux CLI) and if you compare the actual similar code.. it's not that big difference in LOC and line length. Oh, and you don't reinvent the wheel each time you need to have a working help and argument parsing *smirk*.
c) are we still on the "PL for a beginner" topic? For a carpenter microscope is just a very bad hammer.
> difference of opinion
Let's get back to "PL for a beginner". Between Python and PS the latter would win just because it has a better IDE/autocomplete and has automagik on a lot of things what would drive a beginner mad in Python (oh god, just calling an external binary and capturing it's output...)
PS, as an anecdata: I have a friend who can write some Java, for util level things. I've seen his PS code - he treats PS as a full fledged PL (which again - isn't a bad thing, just not the best way to spend your time writing PS scripts). I doubt he wrote anything in Python, but of what I saw in his PS code means he would have no problems (well, except strong typing and indentation, LOL) writing something in Python.