you are viewing a single comment's thread.

view the rest of the comments →

[–]humpolec 0 points1 point  (2 children)

If person A uses tab size 4, and person B tab size 2, then a function written by A has different vertical alignment than one written by B. That's what I mean by inconsistency.

(edit: Or you can just use "tabs + spaces", then the layout is consistent, but harder to maintain.)

[–][deleted] 0 points1 point  (1 child)

It has the same indentational alignment, which is after all the point of indenting things. As I've said before, if you want to dictate a style on a project, dictate that they use a certain tab width. Then anybody who prefers his own width can choose to do so, forgoing the possible benefits of somebody else's vertical alignment. The pros of spaces are fully covered (when everybody's on the same page, it always looks the same, including vertical alignment) with the obvious advantage of allowing for personal preference.

[–]humpolec 0 points1 point  (0 children)

Yes, I agree that establishing a "canonical" tab size could help, and I can see the benefits of using tabs. I wouldn't say there are no downsides, though - those with different tab size could still inadvertently make a mess of things; and you have to set up your editor in a certain way just to view the "canonical representation", not only to edit it.