Re:Google's updated Java coding guidelines
by Chromozon on Wednesday January 29, 2014 @09:21PM
(#7148707)
+1 for no tabs allowed anywhere (must use spaces)
[ Parent
| on HN ]
Re:Google's updated Java coding guidelines
by chroem on Wednesday January 29, 2014 @10:35PM
(#7148923)
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?
Re:Google's updated Java coding guidelines
by mtinkerhess on Wednesday January 29, 2014 @10:58PM
(#7149000)
If 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.
Re:Google's updated Java coding guidelines
by userbinator on Thursday January 30, 2014 @05:15AM
(#7149884)
For 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.