Love4Boobies wrote:
Misalignment is not the only problem with tabs. Using them results in undefined behavior according to the C standard, as they are not guaranteed to be part of the source character set (unlike for the execution character set). There, your code is not only aesthetically volatile, but also invalid.
As much as I would have
loved that argument to be true
, it isn't. (Yes, I immediately whipped up my copy of the C99 standard.)
According to chapter 5.2.2 of the standard, the source character set includes "control characters representing horizontal tab, vertical tab, and form feed" (whatever good
that would do).
Combuster wrote:
Except the style guide is more or less the preferences Solar and you had, just that no one really cared to impose their own.
Guilty as charged.
However (as Fanael rightly pointed out), a style guide is mostly about
getting it over with... It's a big part about getting code that can be read with relative ease, and - in our special case of a Wiki full of tutorials and code examples for newcomers - another big part about teaching those newcomers some code style that won't make them the "ugly code style pariahs" in a pro development team.
I've worked on "trailing brackets" teams, and while I prefer the additional optical help of vertically-aligned brackets would've gone along with that. (It's a style mostly seen in the Java departments, and usually shunned by C/C++ departments, but there you are.) I've seen lots of "no padding spaces" code, and while disagreeing with that style as far as readability is concerned, would have gone along with that, too. Since I went into the role of "benign dictator" here, I naturally went with
my preferences - not before checking that the issue at large
still isn't "decided" in the web, and that I'm not pushing a fringe minority opinion.
But unfortunately the subject that's still discussed is the subject of TAB indents - which, in the context of the Wiki, has two
clear cons IMHO (too-big indents and not being able to type a TAB in the browser editor) while offering
no pros (as you cannot set TABs to your preference in the browser).
While I can
somewhat see the benefit of compile-testing your code before posting, consider what happens if you want to
convert an already-
existing piece of code to TAB indenting: You'd have to copy the code into a different editor, convert there, then copy back... instead of fixing in-place. (Or using the copy&paste approach...) It's just highly impractical.
However, being pushy about a subject doesn't help. I've fielded my arguments against TABs, and will shut up now.