Re:Actual drawbacks to omitting semi-colons?
by nostromo on Tuesday October 05, 2010 @11:53PM
(#1762630)
I always use semicolons in js because I usually compress the code down by removing superflous whitespace -- which would make this style of code not function at all.
[ Parent
| on HN ]
Re:Actual drawbacks to omitting semi-colons?
by mncaudill on Tuesday October 05, 2010 @11:55PM
(#1762636)
The major compressors are syntax aware. When they compress your JS, they'll put in semicolons where needed.
Re:Actual drawbacks to omitting semi-colons?
by suninwinter on Wednesday October 06, 2010 @01:02AM
(#1762802)
A newline takes up just as many bytes as a semicolon.
Re:Actual drawbacks to omitting semi-colons?
by masklinn on Wednesday October 06, 2010 @01:41AM
(#1762864)
But if you have a newline you generally have an indent. Furthermore, there are places in JS where semicolons are absent and newlines are not (after braces).