The only reason few people are aware that you only need semis before lines beginning with ( and [ is because instead of educate people about the actual language all we seem to do is spread misinformation and FUD about semicolons in ES. It's so incredibly easy. That anyone thinks it's a lot to remember is utterly ridiculous. Doubly so in the context of software development. 1 measly rule, that's it.
Instead of saying "Sure use semis if you want, but be aware of ASI and that it may surprise you. Or leave them out except on lines beginning with ( and [, and be aware that ASI may surprise you sometimes. The canonical surprise cited is return\n{ but in practice nobody actually writes code like that so take the warning with a grain of salt.", we instead support this theory.
Crap, I forgot about that. Waiting on the registar to sort that out (and to transfer the domain...), expired end of Jan and the reminders went to my old email address from school so I didn't notice until it was parked :/
0
u/sjs Feb 06 '11
The only reason few people are aware that you only need semis before lines beginning with ( and [ is because instead of educate people about the actual language all we seem to do is spread misinformation and FUD about semicolons in ES. It's so incredibly easy. That anyone thinks it's a lot to remember is utterly ridiculous. Doubly so in the context of software development. 1 measly rule, that's it.
Instead of saying "Sure use semis if you want, but be aware of ASI and that it may surprise you. Or leave them out except on lines beginning with ( and [, and be aware that ASI may surprise you sometimes. The canonical surprise cited is return\n{ but in practice nobody actually writes code like that so take the warning with a grain of salt.", we instead support this theory.