A modest indentation proposal

Quinn Dunkan quinn at chunder.ugcs.caltech.edu
Fri Nov 30 21:36:59 EST 2001


On Fri, 30 Nov 2001 14:35:41 -0800, Erann Gat <gat at jpl.nasa.gov> wrote:
>Now from here on how the story goes is up to you.  If you simply insist
>that the problem doesn't exist you will lose, at least in the short run,
>because for the moment "they" *just know* that it's a problem (in much the
>same way that they *just know* that C++ *isn't* a problem).  If, on the
>other hand, you can show that the community recognizes the problem and has
>a solution then you win.  You are the community.  It's up to you.

I don't personally lose or gain anything if some company does or doesn't use
python.  It's cool if they do, but it's their own gain or loss (was that
back-to-back chiasmus?).

I can't speak for others, but for me personally to "recognize the problem"
would be dishonest, because I don't.  While I'd be perfectly willing to
recognize a horse as a cat if it would make some suits happy, I wouldn't be
willing to go beyond that and start feeding my horse cat food.

I'd be willing to write a little paper that says "Whenever I want to cut and
paste large hunks of code but leave it as a mis-indented unreadable mess, or
write my program all on one line to make it faster, I use the Official Frobozz
Magic Python Mangler, which translates \{ into INDENT tokens and \} into
DEDENT tokens."  I wouldn't, however, be willing to *actually* use the OFMPM,
because one of the reasons I like python is not having to put lots of \{ \} in
my code, and not having to read it in other people's code.  I could lie and
say I did, though, if it would help you out.

If you want the OFMPM, it's basically like pindent.py.  If the change you want
can be solved with an external tool, then pindent.py is official enough to
come in the std distribution.  Using pindent.py wouldn't be "Erann's Hack".
And if *you* think typing "# end for" is too much work, well, as you said what
you think is irrelevant, it's what "they" think.  And historically they don't
seem to mind excessive verbosity.

If that's not enough, and you think there needs to be a fundamental change to
the language syntax, then I'd guess there's no chance of that happening.
Changing how blocks are delimited is hardly a "tiny, inconsequential change".
People read other people's code and work on other people's projects, so
there's no such thing as an optional feature.

Did you manage to convince the lispers that the compilers should support an
optional ()-less infix syntax to make your boss happy?  They'd probably say
"so write a read macro" :)



More information about the Python-list mailing list