Collective memory (was: Good code patterns in Python)

Kevin Handy kth at srv.net
Mon Jul 7 18:16:22 EDT 2003


Cameron Laird wrote:
> In article <mailman.1057083728.8224.python-list at python.org>,
> Bob Gailer  <bgailer at alum.rpi.edu> wrote:
> 			.
> 			.
> 			.
> 
>>This brings back the good old days of FORTRAN IV which had a 
>>single-statement IF and no ELSE. Thus:
>>      C = VALUE1
>>      IF ( A .EQ. B) C = VALUE2
>>Notice the indentation. Cols 1-5 were reserved for line # and col 6 for the 
>>continuation code. So Python is not the only indentation dependent 
>>language. Nor is it the first to use indentation to convey structure.
> 
FORTRAN isn't indentation dependent, it is position dependent.
There is a big difference between the two.

In FORTRAN, certial columns were allocated to specific purposes.
1-5 for the line number, 6 for comment/continuation, 7-75 for the
program line, 76-80 for sequence numbers. [iirc]

If you want a language that was even more position dependent than
fortran, look at RPG-II. You used printed forms for programming to
get the columns correct. One character in the wrong column would
change the meaning of that line.

In PYTHON, it is the indentation itself that matters, not the
actual column position.

> 			.
> 			.
> 			.
> Maybe youngsters don't realize this.
> 
> One monotonous but unremitting argument that Python inspires
> is about the wisdom of its white-space-significance (WSS).
> Modern programmers might not realize how strongly old-timers
> associate WSS with early FORTRAN and COBOL (as we capitalized
> them then), and how unpleasant some of those memories are.
> *That*, I assume, is why WSS discussions become as heated as
> they do.







More information about the Python-list mailing list