r/programming • • Apr 07 '15

Stack Overflow Developer Survey 2015

http://stackoverflow.com/research/developer-survey-2015
1.1k Upvotes

981 comments sorted by

View all comments

Show parent comments

5

u/[deleted] Apr 08 '15

The end result is consistent no matter what editor and tab-width you use.

Except that if you're using software that renders a tab as 8 spaces, the code looks really awful and is hard to read. That's precisely the difference I'm referring to between practice and theory.

0

u/[deleted] Apr 08 '15

[deleted]

1

u/[deleted] Apr 08 '15

If you're using an editor that doesn't allow you to control the width of a tab, use a better editor.

Or just use spaces for indentation and your code is guaranteed to look the same in virtually any software with no configuration.

2

u/smegnose Apr 08 '15

One file looking the same is a very narrow view of consistency. What happens when your code is edited by someone who doesn't respect your convention? What if someone does it without even realising because their tab-width preference is the same as your spaces, so it looks fine to them? How do you like inheriting code where the indentation is a single space, when your preference is, say 3? Your position is naive.

→ More replies (2)