That's true when one tab == one indentation step. Some editors enforce that, some don't. It's common that a tab is 8 spaces, while an indentation step is 2 or 4. So a couple of indentation steps becomes one tab.
I've seen several pieces of bought source or code examples (from outside my company) at work. Every single one that included tabs had these errors and/or a mix of tabs/spaces for indentation. Resulting in a screwed up indentation if you don't use the same tab length as the writer.
I don't have a (big) problem with code with one tab == one indentation step. As long as it's strictly enforced as one tab == inside one curly (or on a curly-free line after an if/for/...), and never more or less than that. But it's very easy to accidentally use the wrong kind of whitespace somewhere and it's hard to spot that when coding. (Many editors have a "visibles" mode that show the whitespaces exactly, but it's usually to cluttered to use all the time.)
Code:
[COLOR=Black][COLOR=Red]--->[/COLOR]if(expression1 ||
[COLOR=Red]--->[/COLOR] expression2 )
[COLOR=Red]--->[/COLOR]{
[/COLOR][COLOR=Black][COLOR=Red]--->--->[COLOR=black]// Lots of arguments to this function.[/COLOR]
[/COLOR][/COLOR][COLOR=Black][COLOR=Red]--->--->[/COLOR][/COLOR][COLOR=Black]Func(argumentA, argumentB,
[COLOR=Red]--->--->[/COLOR] argumentC, argumentD,
[COLOR=Red]...[/COLOR]
[COLOR=Red]--->--->[/COLOR] argumentZ);
[/COLOR][COLOR=Black][COLOR=Red]--->[/COLOR]}
[/COLOR]
If the editor made sure that you don't break this rule, then OK. But then again, if the code moves to someone that doesn't have that feature, you're in trouble again. Most effective way is to not allow tabs in the source.
If there's short tactical comments (short comment on the same line) in the code, I want them vertically aligned to reduce clutter. Not neccesarily on one exact column over the whole file, but the column should not change every other line. Varying tabs would break that.
I looked at your framework source Humus, and you are rather consistent with the tabs, following the rule I see as OK. But there's still places were you indent with just spaces. And you've kind of circumvented the problem in multi line function calls by never doing any, resulting in lines with sometimes >200 characters.
In some of the headers for libs you're using (in Audio and Imaging) there are tabs in the middle of lines, resulting in unaligned comments (that were supposed to be aligned). But that's not your code.
Then there's the problem (here at work) that some people like to
print code snippets for review.
All such printing seem to end in 8 spaces per tab. And 8 spaces per indent looks rather bad. But I see that as a problem with the people who like to print it, rather than with the tabs. :smile: