Coding style article with interesting section on white space

beliavsky at aol.com beliavsky at aol.com
Sat Jan 29 15:53:09 CET 2005


Nick Coghlan wrote:
> Thought some folks here might find this one interesting. No great
revelations,
> just a fairly sensible piece on writing readable code :)
>
> The whole article:
>
http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=1
>
> The section specifically on white space:
>
http://www.acmqueue.com/modules.php?name=Content&pa=showpage&pid=271&page=3

The suggestions in the cited article, "How Not to Write FORTRAN in Any
Language", are reasonable but elementary and can be followed in Fortran
90/95/2003 as well as any other language. What infuriates me is that
the author writes as if Fortran has not evolved since the 1960s. It
has. To be specific, Fortran 90

(1) allows variable names up to 31 characters long
(2) has a free source form where
(a) there are no rigid rules about starting code in a certain
column
(b) white space is significant
(3) has a full set of control structures -- goto's are almost never
needed

More detailed rebuttals of the article are in the archives of the
Fortran 90 discussion group at
http://www.jiscmail.ac.uk/cgi-bin/webadmin?A1=ind0501&L=comp-fortran-90
-- search for "Fortran bashing".

Python looks more like Fortran 90 than one of the curly-brace/semicolon
languages, and both languages have modules and array slices.

One ought to do a little research before publishing an article.
Apparently, many authors and editors are too lazy to do so.




More information about the Python-list mailing list