Spaces or Tabs? Microsoft developers reveal their preferences
developers.slashdot.org
developers.slashdot.org
The spacebar!? ;-)
I used to prefer tabs, now I prefer spaces. If we look at trends, I believe I'm in the (future) right.
Why can't we both look at the same file based on our personal preferences and have, for example, GitHub convert it to the approved team standard on check in?
This way, maybe we can end the spaces vs tabs debate once and for all, and make everyone happier.
if (dense) {
// mine
}
or if ( spacey )
{
// theirs
}Once the configuration is enforced, you can configure many (most?) code editors to visualize the whitespace as desired (tabwidth/tabstop tend to be the features to look for).
Going back and editing indentation levels usually then means turning the hidden symbols on to keep track of the number of spaces.
In a good editor too, you should be able to adjust the length of sections by simply adjusting tab length. Using spaces means manual refactoring should you wish to adjust the length of sections.
Tabs just keep everything consistent and easily managable while allowing text to be easily displayed to the user's liking depending on their editing environment.