On Tue, 20 Jun 2000, Bill Freeman wrote:
> Lots of people are saying that they think that the use of whitespace in
> Python is a show stopper, implying that it makes it hard to understand,
> maintain, spot logic problems, etc., or some combination thereof.

  That's not my objection to it.  My objection to it is that I simply don't
like it.  I've been programming in free-form languages like C, Pascal and Perl
for so long that the idea of whitespace or lines being significant just
bothers me.  One of my measures on when to dump the Unix shell and move to a
"real" language has been when management of newlines (for command termination)
becomes tedious.

  I don't consider this a show stopper by any means, though.  There are plenty
of things in C++ and Perl that I don't like, yet I use them all the time.  
Heck, Perl almost *lacks* a syntax.  I can hardly complain about Python.  :-)

> I say that you can't hold that opinion if you have given the language a
> fair try.

  People who use the dislike of syntactic whitespace as a reason not to *use*
Python are simply saying they are happy with their existing languages, are not
interested in learning a new one, and really are too busy to anyway, so why
don't you just leave them alone?  :-)

> The only whitespace that's significant by amount in Python is the initial
> indentation of a non-empty line.  I (and many others before me) claim that
> this actually *Prevents* logical errors in programming.  ...  [In other
> languages] we all wind up at one time or another blowing an edit ... and
> wonder[ing] why the program wasn't behaving as the indentation implies.

  And the classic counter-argument is that in a language like C, you know that
if your braces and indentation don't line up, you've got an error.  The
language syntax is fault tolerant.  So neener, neener.  :-)

  Frankly, I think syntax is syntax.  People will have make thinko's
regardless of how the language is structured.  I've overlooked blazing syntax
errors enough times that I don't think indentation is going to save me.  :-)

> ... use tabs stops every 8 characters ... as Python interprets them.

  Does Python count a tab as eight spaces, or does it simply count a tab as
one whitespace character?

  In other words, is a sequence of eight spaces the same as one tab, or the
same as eight tabs?

  I'm curious, and since I'm trying to learn Python, I have an excuse,
too.  :)

  (Personally, I'd prefer the latter, simply because I usually set tab (ASCII
character 9 (decimal)) to be 4 characters, because they take up less room that
way.  But I'm flexible.)

>       If you're already a senior Perl and/or (bash|sh|ksh|csh) + sed + awk
> + grep + ... guru, there may be no point in your spending any significant
> amount of time "learning" Python.

  Larry Wall has a saying that I like: "A Perl program is 'correct' if it gets
the job done before your boss fires you."

  There are only two times when you should bother learning a new language:

  (1) When you want to.
  (2) When you have to.

  For the former, only you can decide.  For the latter:  You may have to
because it is the best tool for the job and you'll go over budget (or out of
business) otherwise.  You may have to because it is the only tool available.  
You may have to be because your boss said so and you need the work.

  But learning a language simply because someone says it does The Right
Thing(TM) is a sure way to go wrong.

-- 
Ben Scott <[EMAIL PROTECTED]>
Net Technologies, Inc. <http://www.ntisys.com>
Voice: (800)905-3049 x18   Fax: (978)499-7839


**********************************************************
To unsubscribe from this list, send mail to
[EMAIL PROTECTED] with the following text in the
*body* (*not* the subject line) of the letter:
unsubscribe gnhlug
**********************************************************

Reply via email to