4 ms·
I've never understood all of the hate for using tabs instead of spaces while indenting. My thinking has always been that tabs just make it easier to adjust ind
by chroem 13y ago
I've never understood all of the hate for using tabs instead of spaces while indenting. My thinking has always been that tabs just make it easier to adjust indentation.
As a tab-using heathen, can somebody please explain why spaces would be preferable?
- mtinkerhess 13y agoIf everyone has to use the same level of indentation (as with spaces), then everyone can adhere to the same width limit, and every source file in your codebase will fit in the same sized window. If some programmer sets their tab width to two spaces and then writes code that fits in 80 characters on their screen, it might not fit in some other programmer's screen. From a philosophical perspective, tabs just aren't necessary. You need spaces in your source code in places besides indentation, but you don't need tabs. It's simpler to only have a single type of whitespace character.
- userbinator 13y agoFor me, it's the fact that tabs don't behave like single characters in an editor, so instead of moving backwards a single character-width when you delete one, there's a sudden jump, which I find rather disorienting when I'm editing code (or text files) that uses them.