Ohnoes significant whitespace (was: Considering migrating to Python from Visual Basic 6 for engineering applications)

Ben Finney ben+python at benfinney.id.au
Thu Feb 18 20:03:24 EST 2016


Chris Angelico <rosuav at gmail.com> writes:

> I'm talking about how people, those bags of flesh and thoughts, are
> bugged out by the notion that *whitespace* should matter (other than
> the mere presence/absence of it). It's the price you pay for being
> different - people will have trouble comprehending you.

To be fair, there is good reason for the programming (and broader IT)
community to have a heuristic of “significant whitespace is probably
bad”.

The few languages that did this badly (Makefile syntax, some Unix shell
syntax) leave a legacy of countless headaches and you can't fix the
language retroactively without breaking backward compatibility.

So I am sympathetic to Python newcomers recoiling in horror from
significant whitespace, *before* they try it. And because of that, we
are burdened with forever needing to deal with that reaction and
soothing it.

Those people who claim to have tried Python and *still* complain about
“significant whitespace”, I have no sympathy for. Python clearly does it
right, and it's a huge boon to readability and reducing simple errors.

-- 
 \       “He was the mildest-mannered man / That ever scuttled ship or |
  `\       cut a throat.” —“Lord” George Gordon Noel Byron, _Don Juan_ |
_o__)                                                                  |
Ben Finney



More information about the Python-list mailing list