by code_duck · 7y ago · 0 comments
Not sure when or how it changed, but I'm on the other side of the fence now. Without semicolons (unless multi-statements on a single line), JS is so much cleaner. A line break is perfectly sufficient to signal the end of a statement.
Newline/return characters are whitespace tokens. Differentiating them from other whitespace tokens is the first step on the path to madness. What's next? Treating tabs differently from spaces?
~ (ha ha only serious)
This seems very similar to the c++ issue with single statement ifs.
https://flaviocopes.com/javascript-automatic-semicolon-inser...