LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* Tabs, spaces, indent and 80 character lines
@ 2008-02-24  0:48 Richard Knutsson
  2008-02-24 14:56 ` Krzysztof Halasa
  0 siblings, 1 reply; 13+ messages in thread
From: Richard Knutsson @ 2008-02-24  0:48 UTC (permalink / raw)
  To: Linux kernel mailing list

Good evening

In the thread "Merging of completely unreviewed drivers" I got reminded 
of the "use tabs not spaces"-mentality.
My question is: why?

The tab-character serves us well as a indent-indicator, but for some 
reason there has been focus on its relation to spaces. On the question 
"How long should a line at maximum be?" it is relevant (the question is 
not [1]). So it is set to be as wide as 8 spaces, but when did it become 
a replacement for 8 spaces? Why hinder a developer who prefer 2, 4, 6 or 
any other != 8 width? By only using tabs as indents, and changing the 
CodeStyle to be something like "maximum 80 characters-wide lines, with a 
tab-setting of 8 spaces", that is possible + easier to write 
code-checkers [2].

Or are we really that concerned about the disk-space? ;)

2 cents away...
/Richard Knutsson

[1] As has been pointed out by many, it is the complexity that matters 
(code-checker). A short line can be overly complicated and still under 
80 lines and vice versa. Let the editors handle the long lines for the 
author (even I should be able to write a decent script who can decide 
where to chop-off the line).

[2] As it is now, it can look like the indentation is ex. ... 2, 2, 5, 
3, 3... because the second line is split up. (I think it should have 
been 2, 2, 2, 3, 3 (or even better: 2, 2, 3, 3 ))


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2008-02-26 22:03 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-02-24  0:48 Tabs, spaces, indent and 80 character lines Richard Knutsson
2008-02-24 14:56 ` Krzysztof Halasa
2008-02-24 15:01   ` Miles Bader
2008-02-25 22:13     ` Richard Knutsson
2008-02-26  2:00       ` Jan Engelhardt
2008-02-26 15:50         ` Krzysztof Halasa
2008-02-26 22:03         ` Richard Knutsson
2008-02-24 15:40   ` Richard Knutsson
2008-02-24 16:15     ` Benny Halevy
2008-02-25 21:40       ` Richard Knutsson
2008-02-26  0:47         ` Benny Halevy
2008-02-24 17:36     ` Krzysztof Halasa
2008-02-25 21:56       ` Richard Knutsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).