Obnoxious postings from Google Groups

Roy Smith roy at panix.com
Tue Nov 6 08:52:36 EST 2012


In article <50989a16$0$29980$c3e8da3$5496439d at news.astraweb.com>,
 Steven D'Aprano <steve+comp.lang.python at pearwood.info> wrote:

> Shell do not [quote strings, etc] because they 
> are designed for lazy users and merely aim to be "good enough".

Well, sort of.  Or, perhaps more correctly, "Yes, but that's a good 
thing".

Shells are designed to be interactive tools, where most commands get run 
once and thrown away.  As such, you want everything to be easy to type, 
which largely means your fingers never leave the main part of the 
keyboard and you never have to reach for the shift key.

The basic unix shell syntax was laid down in the days of the ASR-33.  It 
was slow, hard to type on, and only had a single case of the alphabet 
(and missing a few pieces of punctuation).  Saving keystrokes was an 
important consideration. 

Programming languages are designed to write programs.  Not only will the 
code be {used, read, maintained} for a much longer period of time, it 
will be used by people other than the original author, and on inputs 
other than originally intended.  It needs to be more robust.

The problem is that shells got pressed into service as programming 
languages.  At that, they suck.  Sure, putting a few commands into a 
file for reuse was great.  Adding a few bells and whistles like 
variables and conditional execution added greatly to the power of the 
tool.  But, by the time we got to 100 (or 1000!) line shell scripts with 
functions, loops, arithmetic, etc, things had clearly gone off into the 
weeds.  It's just the wrong tool for that.



More information about the Python-list mailing list