← Back to context

Comment by stephbook

4 hours ago

PowerShell is nice. It also reads well. What does sed, tar xvf, jq curl -k actually _do_?

And then passing text lines with > like a caveman. Does bash not have the concept of objects?

You write Invoke-WebRequest and it invokes a web request. Easy.

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.

  • 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.