3 ms·
OP's Python is... exaggerated? (there's too much noise in it, was that deliberate, as an illustration, or just bad Python?), but so is their use of nomenclature
by crabbone 4y ago
OP's Python is... exaggerated? (there's too much noise in it, was that deliberate, as an illustration, or just bad Python?), but so is their use of nomenclature... Shell is not and doesn't need to be a REPL, but, I think, OP is using that word the same way some use REST to mean any kind of HTTP interface, i.e. just a common misconception about what that word means.
Also, OP makes claims about "readable syntax" and "static types", both of which are sorts of common misconceptions. Like... English is readable to you, right? You had little problem reading this after all. All types in Shell are static when you look at the script, and, actually are much more well-behaved, because all of them are string. Both at definition time and at run time.
----
In general, I just don't agree with OP's analysis because, I think, OP interprets status quo as the only possible way things may be. But the reality is that we have a bunch of popular but atrocious shells and a handful of popular but atrocious languages that aren't usually used in shells. The fact that the two groups don't seem to have a lot of overlap is just an accident.
Now, take for example SQL. It's fine to use it interactively, in a way more similar to how system shells are used, but also to write programs in it. It doesn't have modules or some other organizational features other languages have, but do you think it's somehow impossible in principle? -- Of course not. Had there been a will, a new SQL standard would add modules to SQL etc. There's nothing impossible about it. Similarly, had there been a will, SQL could've been used in the same capacity Shell is used today. No reason it couldn't. We use a decrepit UNIX Shell because of standard and tradition. Or we use the circus of PowerShell because that's the only reliably available tool on that OS.
It doesn't have to be that way. It's just that we have a sample size of two, and both are defective beyond belief.