MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/javascript/comments/ffy3c/are_semicolons_necessary_in_javascript/c1fqn5f/?context=3
r/javascript • u/[deleted] • Feb 05 '11
66 comments sorted by
View all comments
1
Yes, they are necessary: http://oss.org.cn/ossdocs/web/js/es4/rationale/syntax.html
(Unfortunately they are not, but if we all would place them properly we might be able to get rid of virtual semicolon insertion at one point.)
1 u/pyalot Feb 06 '11 Actually go and read the virtual semicolon heuristic that the various (open source) javascript engines do. Not only is it a good idea to do the semicolons yourself, pretty much every javascript engine implements a different heuristic.
Actually go and read the virtual semicolon heuristic that the various (open source) javascript engines do. Not only is it a good idea to do the semicolons yourself, pretty much every javascript engine implements a different heuristic.
1
u/mitsuhiko Feb 06 '11
Yes, they are necessary: http://oss.org.cn/ossdocs/web/js/es4/rationale/syntax.html
(Unfortunately they are not, but if we all would place them properly we might be able to get rid of virtual semicolon insertion at one point.)