by lysol · 15y ago · 0 comments
See Scheme and Io for examples of clear, simple syntax.
Also, bash syntax seems a lot less clumsy once you grok unix stuff like pipes, exit codes, and argument parsing (which you should really do anyway before scripting unix in any language). The fundamental abstraction is the command + argument list, and many quirks clearly derive from the syntax trying to stay out of the way of executing commands and gathering the results.
Indeed. After using it for quite some time without really thinking about it much, I've only relatively recently come to the realization that the shell is, in many ways, simply a thin very UI layer wrapped around the kernel's syscall API, and I think the awesome utility of the shell speaks to the quality of the design of that API.
But, YMMV.
Most of the outright bugs in the article you reference have been fixed.
But the design problems are still there in both csh and tcsh.
In particular, the problems with manipulating file descriptors to separate stdout from stderr are still there, the signal catching is not as clean as sh/bash, and csh/tcsh quoting is a mess compared to sh/bash. I know of no good reason to prefer csh/tcsh.
When I ssh into our Solaris server, it drops me into csh by default. That makes me think someone out there believes it's good enough.
Nearly all Solaris systems I've worked on and set up have a sun freeware or CSW system set up on them with all the standard "linuxy" tools installed, so the change isn't that weird.
For example, it is the default user shell on FreeBSD. But the system shell is a Bourne-like shell (ash, I believe?). So for serious usage, even the modern BSDs defer to a Bourne shell.
Csh may feel more programmery, but if you do actual programming use a Bourne shell (or Plan 9's rc).