Collective memory (was: Good code patterns in Python)

Rupert Pigott roo at dark-try-removing-this-boong.demon.co.uk
Thu Jul 3 16:41:49 CEST 2003


"Cameron Laird" <claird at lairds.com> wrote in message
news:vg88va53uha8e at corp.supernews.com...
> 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.
> .
> .
> .
> 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.

OCCAM used WS to denote block structure... For
example the IF construct :

IF
  x > 0
    y := 10
  x < 0
    y := 0
  x = 0
    y := 5

Personally I also found this a pain coming from
a C background... BUT, I grew to love it. It
normalised code layout, which meant that picking
up someone else's code was MUCH easier... As a
bonus it eliminated the holy wars about formatting
that have ravaged through every gathering of >=2
C coders. :)

Cheers,
Rupert






More information about the Python-list mailing list