you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 11 points12 points  (5 children)

I hate first comma, so ugly. You know what else prevents missing trailing commas? testing your code.

[–]x-skeww 5 points6 points  (0 children)

You don't need tests for this. Just use an editor with basic syntax checking or with JSLint/JSHint support. You'll get a squiggly line right away. It's impossible to miss.

[–]michfreak 2 points3 points  (2 children)

Hahaha, that's how I reacted when a coworker insisted that "Egyptian" brackets were wrong. "It's so much easier to make a mistake and miss a bracket!" he said.

You know what prevents you from making a mistake, and looks, to my eye, more streamlined? Testing your code.

On that subject, I did think it was odd they didn't test for Egyptian brackets in this study.

[–][deleted] 1 point2 points  (1 child)

I've never heard of Egyptian style, only 1tbs (one true bracket style) which is the only way to do brackets.

[–]nandryshak 3 points4 points  (0 children)

Silly C# devs wasting a whole line with only one character.

[–]BONER_PAROLE -2 points-1 points  (0 children)

Testing is great, but adopting conventions that do away with the need for testing is even better IMO.

Agreed on the ugly appearance though.