Larry Wall's comment on python...

Peter Hansen peter at engcorp.com
Sat Sep 7 22:51:36 EDT 2002


Gib Bogle wrote:
> Peter Hansen wrote:
> 
>>mmaddox at hcsmail.com wrote:
>>>You must agree
>>>that Python can lead you to horizontal scrolling in your editor - the bane
>>>of user interface design.
>>
>>I definitely don't understand how Python, more or less than any other
>>language, leads to more horizontal scrolling.
> 
> Maybe he is referring to an effect of default editor tab size.

Apparently not, according to an email, which just said that
Python leads one to do this more than with other languages.

My point is that indentation (the way I've done it anyway) looks
*exactly* the same in C, Pascal, Python, or any other block-structured
language, so I still have no idea why Python would feel any different
in this respect for someone.

Clearly I'm missing some point, but I still don't know what it is.

C:

if (expression)
     {
     statements;
     }

Python:

if expression:
     statements

Pascal:

if (expression)
     begin
     statements;
     end

(or whatever... haven't written any for three years).

The only thing that would make me exceed 80 columns with a language
like this is if I couldn't define subroutines and call them, to
keep the nesting from growing too large.  Since all these languages
allow that, I have no idea what is special about Python that leads
to excessive indentation.

Oh well, whatever.

-Peter




More information about the Python-list mailing list