Hacker News new | ask | show | jobs
by arendtio 1687 days ago
Basically, yes. Most arguments expressed here apply to Bash as well as to other POSIX compatible shells. Even the trick from the initial blog post is also works for POSIX shell AFAIK (didn't check). Definitely working is something like (which is just a little more verbose):

  myFunc() { (
    #...
  ) }
So in this case I don't think it makes sense to make a distinction between the two. In essence, I think Bash and the other POSIX shells share most of their greatest strengths and weaknesses.
1 comments

But, wasn't the original argument discussing the merits of Bash as a shell? So you're saying that Bash is great as a shell because it's a shell?
My understanding was, that the initial argument was about Bash as a programming language and most aspects discussed were aspects were Bash is no different than POSIX:

1. Return values of subshells 2. Clean design 3. being a "real" programming language

The only Bash specific part was

> You should stop using Bashisms and subtle, obscure language features unless you absolutely have to.

But in fact, the usage of subshells to limit the scope and subshell return values have nothing to do with Bashisms.