Allowing Arbitrary Indentation in Python
Grant Edwards
grante at visi.com
Wed Dec 19 18:19:33 EST 2007
On 2007-12-19, Gary <gfixler at gmail.com> wrote:
> Grant Edwards said:
> "Code should work the way it looks and look the way it works."
>
> I fully agree. To that end, the MEL UI code I write does look
> exactly like how it works to me. To me, the layouts are a
> stack of a containers, which can be thought of in 3D like this
> (example found online):
The problem is that to everybody else in the world, indentation
in Python represents control flow nesting, not GUI widget
nesting.
Even assuming people can learn new things (in my experience an
assumption to be somewhat avoided if possible), under your
proposal indentation _sometimes_ represents control flow
nesting, and sometimes doesn't. That imposes a much greater
burden on the reader: they've got to spend a lot more mental
energy to figure out whether the indentation of each line
represents control flow or something else. That's a bad thing(TM)
--
Grant Edwards grante Yow! MERYL STREEP is my
at obstetrician!
visi.com
More information about the Python-list
mailing list