Whitespace as syntax (was Re: Python Rocks!)

Dennis E. Hamilton infonuovo at email.com
Sat Feb 12 02:19:01 CET 2000


I know better and I am responding anyhow. Tchh.

Short Answer: There are always reasons.  Reasons don't mean much.  We always
have them.  Arguing about reasons is one of the more non-productive human
activities.

Probably more valuable response:

The first problem that I have with this discussion is that it is too late.
There are plenty of other languages.  Python is what it is and it is not at
all difficult to avoid the problem of invisible misalignment of indented
text.  It can be handled mechanically.  I find it an opportunity to explore
the possibility of using indentation alone for clear expression.  (In
languages with bracketing structures, I am always managing my indentation so
that it is always honestly consistent with the actual structure and yes, I
and others make/miss bugs when that isn't the case.)

For a little off-topic perspective on this, when Peter Landin presented "The
Next 700 Programming Languages" at the San Dimas ACM Conference on
Programming Language Pragmatics, his use of indentation as part of the
language structure was a small part of the paper and its ideas.  Now it was
pretty cool that he had also come up with a way to express the formal
grammar of a language that employed indentation structurally.  And, as you
might have guessed, the discussion of this seminal paper was almost entirely
focused on the use of indentation.

That was in 1965.

Repetition does not make an argument stronger, on either side.  Sorry.  I am
mostly amused by this and I will now restrain myself.

(To show you the errors of *my* youth, as an Algol 60 wonk I insisted that
";" was a separator and not a terminator, even though, as Ben Schneiderman
was quick to point out later using actual replicatable empirical evidence,
most human beings working with computer programs saw it as a terminator.  I
think we have PL/I to thank for that.  I still think that the C Language
view of ";" is ugly [well, a bit of a wart].  It doesn't deter me from
producing C and C++ programs, though.  Even correct ones.)

(And if you want another one, from someone else's youth:  Beside column
sensitivity in the input line, the thing about Fortran not being sensitive
to white space at all came from a concern for keypunching errors and the
propensity for engineers to write early Fortran programs on the backs of
envelopes.   As far as I know, there is no argument to eliminate sensitivity
to white space from programming languages to avoid structural or
transcription problems (wow you could have spaces in identifiers and it
would all work, golly).  Of course the reason that columns after position 72
in the fixed-input line were ignored was originally because the IBM 704's
card reader didn't read beyond column 72 of 80-column punched cards and the
compiler simply never saw that stuff.  The practice was to use that part of
the card for sequence numbers and such to help rescue dropped or reordered
card decks.  The fixed-form input layout of Fortran was created at a time
when that was the only way to get input into those computers and the use of
free-form alphanumeric text, let alone special symbols, was a rare, emerging
practice.  It isn't fair to judge that practice from today's approach to
media and display presentation when no such thing existed at that time.
Aren't you glad you didn't ask.)

-- Dennis

------------------
Dennis E. Hamilton
InfoNuovo
mailto:infonuovo at email.com
tel. +1-206-779-9430 (gsm)
fax. +1-425-793-0283
http://www.infonuovo.com

-----Original Message-----
From: python-list-admin at python.org
[mailto:python-list-admin at python.org]On Behalf Of Eaglestone, Robert
[NGC:B918:EXCH]
Sent: Thursday, February 10, 2000 14:25
To: python-list at python.org
Subject: Re: Whitespace as syntax (was Re: Python Rocks!)

[ ... ]

Hi Gordon,

Here is my problem.

There must be a reason or rationale between 1) the ubiquity
of bracketed syntax, and 2) Python deliberately omitting it.
That is: there is a reason Python doesn't use it, and it must
be a big one or else it just would have used bracketing.  I
want to know what this compelling reason is!

My assumption is that unless it vastly improves programming
the confusion caused by following a nonstandard syntax isn't
worth the change made.

Thanks,
Rob
--
http://www.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list