Tabs Are Better Than Spaces

In code, TABS should be used to indent blocks.
SPACES should be used for vertical alignment.
TABS + SPACES is whitespace Nirvana.

Tab Size:
if (condition) { /* This block is indented with tab */ /* Vertical alignment is done with spaces */ x = 123456.789; y = 12.345; /* Spaces can be used to line up multi-line expressions */ if (one_condition || another_condition || third_condition) { /* This is another indented block, with tab */ log("Nirvana"); } }

The benefits of using TAB for indenting are obvious:

  1. Horizontal whitespace is left as a display setting, configurable by the developer. Some may prefer tab size 2. Some may prefer 8. They both get to view the code in the way that is easiest for them to read.
  2. Vertical alignment of code, comments, and syntax within a block can be done with spaces. The alignment remains correct regardless of the user's tab size.
  3. The semantic meaning of a tab (code block indent) is maintained.
  4. All IDE's support tabs correctly.
  5. Fewer bytes in the file.

Using TABS for indent and SPACES for alignment within blocks gives you the best of both worlds. Developers retain control of the display of their code, while alignment and layout of the code itself remains stable.

Conclusion: Tabs Are Better Than Spaces