by eggie · 11y ago · 0 comments
The author misunderstands how important this is: https://docs.google.com/presentation/d/11vZzXCfAA0aOFAuHA0nA...
The author has created a radically "better" shell language which is twice as verbose as bash. In the space of human-computer interaction where shell languages lie, this is tantamount to total failure.
The worst parts of shell are the flow control structures (if/else...). If only we could improve this without throwing out the entire system. Else we will lose the benefits of the ultra-terse and completely decentralized "language" that is unix shell.
"Shell languages are defined by their terseness."
It is common to see people put a layer of verbosity on top of the Bourne shell (or system(3)) to make "a new shell".
It is also very common to see people put a layer of abstraction on top of a large, verbose scripting language and claim the result to be a new, "terse" language (with all the power of the shell).
But what I like about the Bourne shell is that it is built from only C. And it does not add too much verbosity. It is, as you say, defined by its terseness.
There is also terseness in the roff-like typesetting languages, assembly languages, FORTH, k/q, etc.
Compared to k/q, sh is verbose.
For me, verbosity means loss of power and loss of time.
I am glad there are terse languages.
They may never again be popular but I think they will always exist.
"The worst parts of the shell are the flow control structures..."
For some reason I dislike if/then/else. Instead I make heavy use return values, ||, test(1) and case/esac.
I always wished Bourne's shell (cf. Joy's C shell) made use of more C operators. There's a file called arith_lex.l in the Almquist sh source but these operators are not used in the sh language.
I would switch to the Plan 9 shell but Bourne sh remains more useful due to its ubiquity.
However, there is some non-zero amount of verbosity that would be worth trading for better control flow, composability, data structures, etc. As long as you can do simple operations and pipes with the same syntax
| grep foo
cp * path/
rm -rf
it's ok if some operations are more verbose in exchange for that.Programmers don't live in bash, and deal with the pain points of switching between bash and an actual programming language on a regular basis. I know I'm there. A change that sometimes is more verbose but lets you do more things in shell would still have benefits.
You might not win over the people who are bash experts, but you could still produce a better tool for many people.
I don't agree control structures are a major problem. There are subtle differences between correct and incorrect expressions, and they are not checked at "compile" time.
One should be able to also write a debugger that can switch between these modes in real-time.