Hi,
After much use of tabs worth 8 spaces, and constantly having to
format my C++ code in funny ways to keep all lines within an 80
character line length limit, I'm seriously thinking of switching
to using 4 spaces per tab. I feel like I'm about to lose a a
long suffering faithful companion...
What are your views on this? Any words of sympathy? :0)
The following paragraph is from Linux Torvalds, the
original author of the Linux kernel. This is the coding
style of the Linux kernel.
"Tabs are 8 characters, and thus indentations are also 8
characters. There are heretic movements that try to make
indentations 4 (or even 2!) characters deep, and that is
akin to trying to define the value of PI to be 3.
Rationale: The whole idea behind indentation is to clearly
define where a block of control starts and ends. Especially
when you've been looking at your screen for 20 straight
hours, you'll find it a lot easier to see how the
indentation works if you have large indentations. Now, some
people will claim that having 8-character indentations
makes the code move too far to the right, and makes it hard
to read on a 80-character terminal screen. The answer to
that is that if you need more than 3 levels of indentation,
you're screwed anyway, and should fix your program.
In short, 8-char indents make things easier to read, and
have the added benefit of warning you when you're nesting
your functions too deep. Heed that warning."
So you're not alone with 8-char indents..
--
|||
(0-0)
+--------oOO--(_)--OOo----------------------------+
| Wellu Mäkinen
www.wellu.0rg |
| |
| No tears please, it's a waste of good suffering |
+-------------------------------------------------+