Hacker News new | ask | show | jobs
by static_motion 42 days ago
I find that PowerShell's syntax choices and verboseness make it just as cryptic as bash. "Okay, now we Get-Object... Ah crap, that's not it, what was it again? Ah yes, Select-Object... Okay now we pass that into Call-WebRequest... Wait that's not it either...".

The language designers managed to introduce the ambiguity of natural language into a shell scripting language. As a developer, I think that it makes PS wildly unergonomic and I find it easier to remember bash/Linux idiosyncrasies.

2 comments

Introducing natural language uncertainties into a scripting language reminds me of AppleScript, which used almost entirely English words (mainly in sentences or at least verb phrases), but was nonetheless notably definitely not English. It was quite possible to forget at times which English verbs were language keywords and which weren't.

If I remember correctly, AppleScript was inspired by HyperTalk, which also mainly used English keywords in English-inspired syntax, but most HyperTalk wasn't valid AppleScript, and vice versa.

There is a standard[0] you are ignoring either intentionally or out of ignorance. It is okay that you are used to Bash but please stop spreading false information about PowerShell.

[0] https://learn.microsoft.com/en-us/powershell/scripting/devel...

It's not false information. I'm just saying it's as idiosyncratic as bash is (and no, defining its own special standard doesn't make it less so, it just makes its idiosyncracy well defined), and that I have a hard time agreeing with anyone who says that PowerShell's syntax is more intuitive than bash. You still need to learn the special naming scheme, same as needing to learn bash's own quirks. Someone who comes from bash to PS might not know about the existence of that "standard", and might fumble about as I described.