Re:Actual drawbacks to omitting semi-colons?
by jasondavies on Wednesday October 06, 2010 @04:52AM
(#1763216)
I've grown to prefer:
var foo,
bar,
baz;
It seems less cluttered. You can of course introduce errors through copy/paste/reordering, but I think it's a reasonable tradeoff. I agree about comma/semicolon-first being strange though.
I'd rather consistently have semicolons at the ends of lines than crap like this:
It's easier to always include the semicolons at the end of statements rather than try to figure out the edge cases where missing a semicolon would change the behavior.I'm also not a fan of the "comma-first" style, especially for var declarations...
I prefer: It's fewer lines, consistent, symmetrical, and it's impossible to introduce errors through copy/paste or reordering.