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

4

u/Bettina88 Apr 01 '18

So Google is now declaring that using tabs to indent code represents "incorrect" JavaScript.

Lol. This is not going to go over well, Google.

Let the fighting begin!

2

u/joesb Apr 04 '18

It’s a style guide. People who works in the same project should follow the same one.

Are you declaring that your project should mix tabs and spaces?

1

u/Bettina88 Apr 04 '18

In the same .js document, no. But in the same project? I really don't care.

2

u/joesb Apr 04 '18

So you are just waiting for someone to fuck it up. Instead of agreeing with the team once.

2

u/Bettina88 Apr 04 '18 edited Apr 04 '18

Honestly, when people say things like this it makes me wonder if they've ever worked on a large, distributed Javascript project.

There's code from dozens of sources, repos and libraries incorporated in every large project. You'll be editing code written by hundreds of different people.

You want to force a rigid, pointless indenting standard across hundreds of individual .js files?

Jesus, if your coders can't open a file and instantly see what the indentation (or function bracketing, or object structure) standards are and adapt to that individual .js file... then maybe get some actual coders and stop hiring interns.

This is like arguing about which end of a hard boiled egg to start on.

What we have here are Google style weenies being Google style weenies and trying to keep their jobs.

2

u/joesb Apr 04 '18

There’s no arguing. The styleguide is there. Follow it. Done.

You are the one arguing.

1

u/Bettina88 Apr 04 '18

Logic recap: "There's no arguing" ... "You are arguing".

I'd hate to see your code.

2

u/joesb Apr 04 '18

I’d hate to see yours as well.

1

u/Bettina88 Apr 04 '18

You use my code. I promise.

2

u/joesb Apr 04 '18

Doesn’t matter. I’m not working with you lol.

→ More replies (0)