DEV Community

Discussion on: The Tab Advantage

Collapse
 
rytheturtle profile image
RyTheTurtle

Tabs vs Spaces to me is just bike shedding.

  1. Mainstream editors can switch between spacing styles on the fly and will even auto-replace spaces with tabs or vice versa
  2. If teammates have to adjust their IDEs to read indentation levels of code, your code has a problem with being excessively nested. Rather than debating spaces vs tabs, the team should be discussing how to refactor the code to not be heavily nested.
  3. If saving bytes in source files had a meaningful impact to energy consumption or bandwidth usage, everyone would be writing code in awk and perl, abusing regular expressions wherever possible, and limiting all variables and class names to 3 characters or less.
Collapse
 
cyrez profile image
Cyril Reze

Yes you're right! No debate. Tabs are just better ;-)

About 1.
Why not use tabs that natively respect user preferences?

About 2.
Have you ever contributed to a large open source project such as a CMS?
With hundreds of contributors, you need code standards and clarity for a good contributing ecosystem.

About 3.
I think this point is out of context. Using spaces or tabs has no side effects on understandability, while limiting variables and names to 3 characters or less, as you suggested, is really extreme. The main goal of code is readability, structure, and accessibility. Using less disk space is just a bonus, although important!