A modest indentation proposal

Justin Sheehy justin at iago.org
Thu Nov 29 20:44:45 EST 2001


gat at jpl.nasa.gov (Erann Gat) writes:

> syntactically-significant indentation 

> It also IMO makes the language unsuitable for mission-critical
> applications.  It's just too easy to screw up indentation
> (particularly when cutting and pasting large blocks of code) without
> realizing it.

You are looking at the wrong cause of your problems.

Cutting and pasting large blocks of code without adequate verification
and testing makes the programmer unsuitable for mission-critical applications.

Decent programming practice and an enforced indendation style will
make this a complete non-issue.  Any programming team that doesn't
already enforce a specific internal coding style has no business
writing mission-critical applications.

> I have a suggestion
> [snip]

Your suggestion is unworkable as it would throw warnings on currently
correct, well-formed code.  Expecting everyone to add completely
uneccessary semicolons at the end of blocks is not only unworkable in
practice, it also wouldn't achieve your goal.  A semicolon is already a
valid character at the end of a line, and is essentially ignored.

> Comments?

Indentation is already significant to the programmer in nearly every
common language.  If the programmer or programming team is competent,
making that whitespace similarly significant to the language does not
cause any problems.

-Justin

 





More information about the Python-list mailing list