Whitespace as syntax (was Re: Python Rocks!)
Roy Smith
roy at popmail.med.nyu.edu
Mon Feb 7 21:22:59 EST 2000
fcahoon at my-deja.com wrote:
> If python code were to become mis-formatted (and given my experience, I
> have to believe that sooner or later this _will_ happen) there is _no
> way_ to be certain what the original author's intent was, much less to
> fix it automatically. This is a Bad Thing(tm).
I'm a hard-core python addict, and I agree 100% with fcahoon. This
sillyness with indenting for statement grouping is without a doubt the
most serious blemish on the language.
I fear disaster every time I have to move a block of code. As the logic
of my program develops, I'll either have to move a block of code into an
if, or move it out of one, or I'll take a block of code and turn it into
a function/method of its own, or maybe even extract something into a
subclass. This means cutting and pasting (well, killing and yanking,
since I use emacs), and changing the indent level up or down. Emacs
tries to be smart about indenting and sometimes does something wrong,
changing the meaning of the code. Worse, it leaves behind not only code
which is semantically wrong and syntactically correct, but it's also
visually reasonable looking. It is a human factors nightmare.
Why do I use python? Because the class mechanism is simple and
powerful, the fact that it's interpreted makes it easy to
develop/prototype in, it's high level, and the wide assortment of
library modules means it can do all sorts of wonderful stuff.
More information about the Python-list
mailing list