Perhaps PowerShell is the new COBOL?
Re:Linux and Powershell
by marcosdumay on Tuesday January 19, 2021 @06:42PM
(#25840547)
The rigid and obscure syntactic structure also checks. It's a couple of hours task for me to define a function, mostly spent on debugging the definition.
(Probably, if I did it all the time, I'd get it right every time. Just like creating and using COBOL variables.)
I have the same problem with bash.
I have spent hours trying to write a simple function which in PS would have been 10 minutes.
Re:Linux and Powershell
by marcosdumay on Tuesday January 19, 2021 @10:12PM
(#25842188)
You mean writing the function body? I was not talking about the function body, but about getting the declaration correct. (The bad error messages and lack of real time verification surely contribute here.)
PS is more powerful than Bash, it really should be faster to write a function body in it.
Re:Linux and Powershell
by NikolaNovak on Tuesday January 19, 2021 @12:01PM
(#25835528)
Hah, I was thinking of that... I did have to code in COBOL for 6 months in ~2000 and I see some similarities in syntax paradigm (though superficial of course) - but I figured the reference would be too obscure for majority of HN audience :->
Re:Linux and Powershell
by userbinator on Tuesday January 19, 2021 @09:54PM
(#25842067)
Indeed, I have the same reaction to Powershell syntax as I do Enterprise Java and C# --- extremely verbose and hard to actually read beyond the surface --- the fact that it contains English words is in some ways deceptive. The mixed case Reminds Me Of People Who Always Write Like This, and that's as annoying as it looks. My theory of why it is harder to read is because longer sequences of characters are harder to memorise than shorter ones.
Kind of like I struggled with PMP exam and memorization because "Integrated Change Control Management" became "Controlled Management Change Integration" or "Managed Variation Integration" or whatever in my mind,
"Retrieve-Child-Item" vs "Get-ChildItem" or "Send-Command" vs "Invoke-Command" "Remove-Tiingamajiggy" vs "Delete-Whatchamacallit"... my mind is seemingly better equipped to memorize "obscure but unique" gobbledygook rather than "meaningful-but-generic" verbiage :|