Quote:
Originally Posted by Wolfram
The question isn't what button you press. Nobody that advocates spaces over tabs is pressing the space bar n-times for each indentation.
It's a question of convenience over conceptual purity. Indenting by converting tab-key presses to spaces is more convenient since it preserves layout from editor to editor. Using tabs is more semantically correct (I guess).
In the end it really doesn't matter, as long as you are consistent.
That's not the argument for tabs (at least from what I've seen in modern times and not on Silicon Valley). The argument for tabs is that each coder can have the code look the way THEY want it to via their personal tab settings.
The improper counter-argument for that is that alignment gets screwed up between people. One guy aligns a bunch of lines of code based on 4-space tabs, and for the next guy who likes his 3 space tabs, it looks screwy (because the first guy might align something with the line above it with tab-tab-tab-space (say 13 chars), and the 2nd guy with 3-space tabs would see it only 10 chars in).
The counter-counter-argument, and the reason why the first counter was incorrect, is that tabs should only be used for
indentation, NOT
alignment. Spaces should always be used for alignment. (So in the example from my last paragraph, the alignment would be performed with 13 spaces, looking the same on both machines). This can be clarified easily if desired. Now, manual alignment of structured code is preserved across settings, while simultaneously allowing different people to use their different tab settings.
The potentially valid counterpoint to tabs is if people don't correctly follow the rules I alluded to in my last paragraph. Then sure, spaces MIGHT end up being more successful. I'd say that's a case dependent decision, and independent of which is "theoretically" best.