Hi, this was to push the discussion in ANY direction, as I don’t believe there is anyone who’s content with current state…
I’ll put some of my arguments here.
Regarding tab vs spaces, I’ll repeat stuff from first link:
“tabs for indentation, spaces for formatting”
I’m in a [tab] camp, mainly because you can setup probably any editor, to display it with the width YOU prefer.
(I’m sure about vim, visual studio, code-lite, and I guess code blocks too).
Also in case of some of them, you can actually “display” them (e.g. in vim, you can [tt]:match[/tt] them, in VS you can show them as ‘arrows’, like in text editor, here’s a screenshot http://stackoverflow.com/questions/4065815/how-to-turn-off-showing-whitespace-characters-in-visual-studio-ide)
I don’t think you can do opposite thing easily, that is you have two spaces and display them as four…
and as for tabs, we could actually have pre-commit hooks in git, that would check, that no spaces occur before any printable character…
Regarding brackets, I must say I don’t care, as long as it’s consistent.
However I’m in favor of ALWAYS using brackets even in case of if with a single statement (this is -j option), that is:
if (foo)
{
bar;
}
and never:
if (foo)
bar;
so in this case 1TBS simply takes less vertical screen-space, but as I’ve said, I don’t care about it, as long as it’s consistent.
regarding other options and ‘styles’, if you have some time, you can take a look here:
http://astyle.sourceforge.net/astyle.html
P.S. I hope no sane person, would ever vote for something like whitesmith or gnu style ;>)