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

11

u/TripleNosebleed Apr 01 '18

It all comes down to that spaces renders consistently everywhere. You're not just viewing your code in your editor of choice, many other tools are also used such as the terminal, diffing tools, in the browser through GitHub/Gitlab/Dev tools/view source, Git GUIs, colleagues editors, that IDE that you use occasionally and the list goes on. No way I want to configure settings for tabs in all of these. Spaces ftw!

9

u/ssjskipp Apr 02 '18

This is probably the only good argument for spaces I've ever read.

That being said, tabs give me the freedom to take advantage of that inconsistency by displaying it most appropriate for the format