Tabs -vs- Spaces: Tabs should have won.

Thorsten Kampe thorsten at thorstenkampe.de
Sun Jul 17 03:35:02 EDT 2011


* rantingrick (Sat, 16 Jul 2011 09:51:02 -0700 (PDT))
> 3) Tabs create freedom in the form of user controlled indention.
> 
> Indention width should be a choice of the reader NOT the author. We
> should never "code in" indention width; but that is EXACTLY what we
> are doing with spaces! No, the reader should be able to choose the
> indention width without ANY formatting required or without any
> collateral damage to the source code. Tabs offer freedom, spaces offer
> oppression.

Why are you so obsessed with indentation length? Indentation length is 
just /one/ of the formatting choices that the author makes for the 
reader - and probably the /least/ significant one.

There is for instance maximum line length, the number of empty lines, 
the author's method of alignment, spaces between the equals sign and so 
on. These are all much more "dominant" in the source code and none of 
this is left for the reader's disposition.

Compare for instance

variable        = 11
anothervariable = 22

def whatever (prettylong     = 1,
              alsoprettylong = 22,
              anotherone     = 33):
    pass

to

variable=11
anothervariable=22
def whatever (prettylong=1, alsoprettylong=22, anotherone=33):
    pass

Thorsten



More information about the Python-list mailing list