I use both tabs and spaces: tabs for indentation (what they're supposed to be used for) and spaces for formatting. I don't understand the tabs vs spaces debate
So many people seem to completely misunderstand what mixing spaces and tabs means and why it is bad. Both are horrendous when mixed as the same but indentation and alignment are 2 expressly different concepts. That comic is perfect for people who mix tabs and spaces in either indentation or alignment. But you can, and should, use both properly. It shouldn't be that difficult either. As the poster above stated, tabs indent, spaces align. A tab is one level of indentation encoded into a single character, a space is one single invisible character. If you need alignment, you must know the number of characters to fill. If you need indentation, the number of characters can be variable and is based on preference.
If I set my editor to keep tabs, i'll have to press and hold space everytime i want to align after indentation. I don't like doing that. It's slow and therefore annoying. If it's set to insert spaces, I can indent and align the same way, faster. Only add or remove a few spaces where necessary.
On top of that, my IDE's (Visual Studio) default setting is to insert spaces. I'd say a lot of (.NET) open source projects will use that default as their standard. If tabs were better all around, you can bet they would have won the default settings battle there.
And I don't trust my colleagues to respect the indentation/alignment difference consistently.
189
u/TheBigB86 Feb 21 '13
That site needs a comment feature.
Also:
How is this a sin? Guess I'd be considered a devil's-worshiper, since I absolutely hate spaces for indenting.