[ODE] Standard for formatting the code ?
John Miles
jmiles at pop.net
Tue Apr 11 10:41:20 MST 2006
I agree that you have to be able to deal with both styles to work on any
sort of real-world project. Spaces are nice, though, because no real-world
piece of C code uses tabs alone for indenting. People tend to use both tabs
and individual spaces to group portions of complex subexpressions...
particularly to reinforce visual similarities between multiple physical
lines.
Now, what happens when you pull that code into an editor with different tab
stops than those used by the author? The relationship between tab and space
characters is totally hosed, all aesthetic cues are lost, and the code looks
like ass. Worse, because there's no metadata in a text file, you have to
reverse-engineer the author's tab stops if you want to turn the file into
something readable.
Tabs suck, and they always will, because the formatting problems they cause
are hard to fix. (CR/LF versus CR-only, on the other hand, would be a moot
point if I didn't have a lot of poorly-written console apps that cared about
the distinction...)
-- jm
> I've also wondered about this - why do some of you prefer spaces?
> Tabs are
> much faster to work with - eg. backspacing a single tab instead
> of (say) 4 x
> spaces.
More information about the ODE
mailing list