Re: On Tabs and Spaces

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, 2007-10-16 at 12:20 -0700, Linus Torvalds wrote:
> The only sane solution is the one the kernel and git have always used: 
> tabs are 8 spaces wide, and anybody who disagrees can go screw themselves. 
> If you don't have 8-character tabs, you *will* get odd indentation.
> 
> And no, the answer is not to say "don't use tabs at all" and replace them 
> by spaces. The answer is *also* not "tabs are just for initial code 
> indents", because not only will most sane editors never even show the 
> difference, it's simply not how people work. So such a rule about 
> invisible things doesn't work.
[...]
> The fact that some projects have encouraged bad coding style and *insane* 
> tab values is not a git problem. We should teach people to do *better*, 
> not become worse just because others have done idiotic things.

I'm reading two different ideas here, and it seems like you're
conflating the two — and, in the process, telling some pretty smart
people (smarter than me, anyhow) to go fuck themselves.

If a project uses tabs, your statement regarding 8-char-width tabs makes
sense; you need some rule by which you can assume others are viewing the
same thing you are.

But you then dismiss out of hand the option of using all spaces; Python
has been getting along perfectly well for quite some time by following
this rule, and my experience with the language leads me to believe it's
the wiser of the choices.  Questions over tab width simply *go away*;
you pick an indentation level (Python uses 4) and stick with it.

I'm not arguing that git should switch to all spaces; projects tend to
become set in their ways, and consistency can be valuable.  I'm merely
pointing out that all-spaces is a quite *sane* option, even if it's one
git doesn't choose.


-
To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux