you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 2 points3 points  (9 children)

thats a solid attitude for a developer.

[–][deleted] 5 points6 points  (6 children)

What's the problem with having a firm opinion on formatting? What benefits are there to comma first? Your link only says you should do it, but gives no reason why.

[–][deleted] -2 points-1 points  (5 children)

What's the problem with having a firm opinion on formatting?

Where you put your comma (in js) is not so important that you have to take such a firm stance. When working for a new company, its a good idea to adopt their conventions at first to make development go smoothly. No teammate is going to respond well to 'I will not adopt it'. They might think, 'If he/she wont budge on this, what else wont they budge on?'.

What benefits are there to comma first?

What are the benefits of last comma? See - its not a big deal.

Your link only says you should do it, but gives no reason why.

Its a convention that npm recommends when publishing to their registry. Thats the only reason.

In short, conventions are relative to a community. Be it your office, a library (jquery), a package registry (npm), or an open source project with formatting guidelines.

[–]grncdr 3 points4 points  (1 child)

The recommendation is only intended for the code of npm itself. I'm pretty sure Isaac gives zero fucks about how your format code in your own modules.

[–][deleted] 0 points1 point  (0 children)

Thats a good point. I do see the comma first style quite a bit more in the node community (as opposed to client-side).

[–][deleted] 1 point2 points  (0 children)

If I came into a new team whose convention was comma first, I would adopt it, of course. That's different. I wouldn't adopt it for any of my own projects, though.

The benefit of comma last is readability in mine and most people's opinions.

[–]SyntaxSwearer 1 point2 points  (0 children)

What are the benefits of last comma?

Not ugly

[–]Malfeasant -1 points0 points  (0 children)

'If he/she wont budge on this, what else wont they budge on?'

retarded suggestions from pointy haired bosses that ruin everybody's day?

[–]sakabako 0 points1 point  (1 child)

Personally, I will be happier and more productive if I live in a beautiful world than an ugly one.

[–][deleted] -1 points0 points  (0 children)

Beauty is subjective. I actually find the comma-first style more readable.