Python Rocks!
Tim Peters
tim_one at email.msn.com
Thu Jan 20 01:49:15 EST 2000
To tye4's bold rhetorical ploy:
>> There is not single programming language that forces
>> such a bizarre indentation rule.
William Tanksley makes a futile rejoinder:
> Yes, there is -- Python.
Futile because, alas, it now appears open to question whether Python really
is a "programming language" <wink>.
AFAIK, the first programming language to use indentation to denote block
structure was Landin's ISWIM (If You See What I Mean). That was about 30(!)
years ago. It was very influential at the time, although ISWIM was a
functional language and so outside "the mainstream". Its influence persists
in modern functional languages, which *still* usually use indentation to
denote block structure. For example, look up Haskell. That also has an
optional notion of explicit block closers (in fact, the all-whitespace form
is defined as syntactic sugar for the explicit form), but it's *so* optional
<wink> that I don't recall ever seeing a Haskell program use explicit block
markers (except in the language reference manual).
Python got its treatment of whitespace from ABC, definitely not a functional
language. I don't know whether ABC's designers were influenced by the
indentation tradition in the functional world, or thought of that on their
own.
In a third line of development <wink>, a friend designed a turtle graphics
language to help his son learn how to program (LogoMation; see
http://www.magicsquare.com/LM2/
). He was not a functional language fan, nor had he used Python; his
favorite language appeared to be Prolog. Simply by watching what his son
got confused by, he apparently hit upon the idea of indentation == block
structure on his own, and that's what LogoMation does. Its "industrial
strength" successor L3 (http://www.magicsquare.com/L3/ -- impressive web
technology) also uses this scheme.
So, programming language or not, Python isn't the first or the only, by
decades or by a long shot.
although-it-may-be-the-last-ly y'rs - tim
More information about the Python-list
mailing list