News for hackers. Stuff that matters.
Re:Poll: Spaces or tabs? by hboon on Saturday February 02, 2013 @11:06AM (#5156285)
Why do you want to end up with spaces? Consider the alternative: if you end up with a tab, what's the downside?
Re:Poll: Spaces or tabs? by drcyrusflame on Saturday February 02, 2013 @11:18AM (#5156334)
Other coders you might be working with on the same project may be using a different editor with different tab-width settings which may lead to improper indentations making it hard to read the code.
Re:Poll: Spaces or tabs? by dragonwriter on Saturday February 02, 2013 @12:21PM (#5156577)
What I'd generally prefer is tabs (keyed and stored) for block-structure indententation, and spaces for visual alignment of single logical expressions broken into multiple lines for readability (where you are aligning the following lines with some element of the preceding line.)

This, incidentally, will preserve correct relative indentation regardless of tab settings in editors (it would even work for python, since you only have the first kind of indentation in python given python's indentation sensitivity, but the convention of spaces-over-tabs is so strong in Python that its not worth debating, given how much higher the cost of inconsistency is compared to the cost of choosing the less-ideal option consistently.)

Re:Poll: Spaces or tabs? by petercooper on Sunday February 03, 2013 @01:05AM (#5158838)
Consistency.

Sometimes I might use tab, sometimes I might notice something's off by one and use a space (for right or wrong, habits + muscle memory etc.) I also use code from other developers who may be even more inconsistent or pick one over the other.

If everyone just uses spaces - as in common in the worlds I work in - a lot of the above issues are prevented.

Re:Poll: Spaces or tabs? by lutusp on Saturday February 02, 2013 @04:47PM (#5157476)
> if you end up with a tab, what's the downside?

The downside is that different environments (and different languages) will interpret the tab differently. Not so for spaces.

This is not usually an issue unless both tabs and spaces are used in the same file, and that was my qualifier.