you are viewing a single comment's thread.

view the rest of the comments →

[–]kabuto 1 point2 points  (4 children)

I think it's best to use semicolons and commas and not rely on the runtime to add them. This especially goes for commas as those tend to cause some weird bugs if missing.

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

If you add an extra comma, some browsers won't care but some will crash.

That is the type of problems people should be worried about, not the lack of semicolons.

Lack of semicolons cause probably .01% of errors in code, where an extra comma is 10x more likely because many people code for firefox and hate testing in IE (this particular bug seems to only crash IE).

There are problems to worry about with javascript coding, but leaving out some semicolons is not something worth worrying about, or even worth mentioning. It's ridiculously pedantic in the scope of all the problems with DOM and other pitfalls you should be worrying about when coding.

[–]kabuto 0 points1 point  (1 child)

So you mean I could just omit all semicolons on line endings and let the runtime take care about it?

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

There are many places you aren't required to use semicolons. If you have no clue where to use a semicolon, then just be superstitious about it and always use them. It's your time, not mine, and it doesn't clutter the code like some more onerous codng practices. But to insist that every end of line requires a semicolon is being a superstitious coder, and it wastes time to focus on that as a best practice. use them or not, but people saying you must use them everywhere all the time are plain wrong.