standards - Why was automatic semi-colon insertion (ASI) added to javascript? -
because of "religious war" @ current work place have decided research history of asi feature of javascript.
but having trouble finding out why , when asi introduced javascript.
it seems has been feature forever, there specific reason there 2 ways terminate statement in javascript?
some sources describe asi error-correction feature, imply omitting semi-colons bad practice.
is there performance impacts on relying on asi?
personally prefer semicolons because makes intentions more explicit, personal preference isn't viable argument in serious discussion.
great question!
brenden eich designed javascript programming language originally, , think fair agree automatic semicolon insertion design flaw in language.
we shouldn't blame him. designed language in period of 10 days in 1995, having no idea 20 years later become (probably) important computer language on planet.
in following post says "i wish had made newlines more significant in js in ten days in may, 1995."
https://brendaneich.com/2012/04/the-infernal-semicolon/
read on... :)
Comments
Post a Comment