Re: On Tabs and Spaces

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

 




On Wed, 17 Oct 2007, Jeff King wrote:
> 
> In what way does an all-space model cause people to accidentally add
> tabs, but an all-tab model does not cause people to accidentally add
> spaces?

It happens. We do de-spacification in the kernel occasionally when it is 
an annoyance. Usually it shows up in patches, though - exactly because 
code which adds spaces instead of tabs won't line up correctly in the 
diff.

So it doesn't matter *which* one you use (all spaces or all tabs) in that 
sense. But clearly tabs are *way* more common at least in any UNIX 
project, and tabs really do have the advantage of being smaller.

And smaller *is* faster. Do something like this on the kernel:

	GIT_PAGER= time git grep sched_fair

and then do the same thing with the kernel sources blown up by 20% by 
de-tabification. Guess which one is 20% slower?

And whoever said that disk space doesn't matter doesn't know what he is 
talking about. Disk space most *definitely* matters. Do the above test 
with a cold-cache case, and think what 20% more IO does to you (or 20% 
less disk cache).

But no, the size issues are secondary, I'm not claiming anything else. 
Although I do suspect that historically, they have been primary, and have 
been the thing that has resulted in the fact that tabs are so commonly 
used.

			Linus
-
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