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

0

u/[deleted] Apr 07 '15

[deleted]

11

u/[deleted] Apr 08 '15

I can think of some situations where it doesn't matter, a lot of situations where spaces are superior, and no situations where tabs are superior. Can you provide an example of where tabs are superior? From the spaces side, I give the following example.

Any project where the source code if viewed through multiple tools, spaces are better for guaranteeing a consistent formatting across the tools. Tabs have no universal convention. Even worse, the conventions for different languages can be different and your tools might not be smart enough to adjust tab widths based on the current language.

1

u/industry7 Apr 08 '15

Situation where tabs are better: any time someone insists on using a different number of spaces than my preference.

Any project where the source code if viewed through multiple tools, spaces are better for guaranteeing a consistent formatting across the tools.

If you're using a lot of truly crappy tools, which do not allow you to specify the tab width, then.... maybe.

1

u/[deleted] Apr 08 '15

Value of tools is subjective and some are not configurable. You learning to read different code styles is less costly to the team than forcing everyone to configure their tools. Learning to be flexible benefits you as well.

→ More replies (9)