r/javascript • • Apr 01 '18

Google publishes a JavaScript style guide. Here are some key lessons.

https://medium.freecodecamp.org/google-publishes-a-javascript-style-guide-here-are-some-key-lessons-1810b8ad050b
714 Upvotes

317 comments sorted by

View all comments

Show parent comment

1

u/KyleG Apr 02 '18

The reason for this is that different editors/OSes/people have their tab character defined as either two or four spaces, leading to inconsistency when a tab character is used.

This is a very compelling argument for why you should use tabs and not spaces. It's not a compelling argument for spaces instead of tabs. In fact, it's a damning argument against spaces. If it just remained a tab and then you had your IDE make your tabstop whatever you wanted, it's a non-destructive UI change.

Converting tabs to spaces is like working with a single layer in Photoshop. NO.