Why semicolon insertion is designed?
# David Bruant (12 years ago)
Le 27/04/2013 11:10, BelleveInvis a écrit :
I'm wondering that why semicolon insertion is designed and made it anti-intuitive?
Automatic Semicolon Insertion (ASI) was designed a while ago and can't be changed whether we find it intuitive or not. More details at brendaneich.com/2012/04/the-infernal-semicolon
To provide Java-style syntax compatibility?
I think it was just to be nice with devs who would occasionally forget a semicolon. You're allowed to have opinions on this, but be aware that the language won't change that aspect since too much content on the web depends on the current behavior.
I'm wondering that why semicolon insertion is designed and made it anti-intuitive? To provide Java-style syntax compatibility?