10 biggest JS pitfalls
jorge at jorgechamorro.com
Mon Dec 31 09:47:35 PST 2012
On 31/12/2012, at 15:55, Juan Ignacio Dopazo wrote:
> I'm surprised not to see Automatic Semicolon Insertion in the list.
Yes I would ditch ASI altogether if only to force the javascrhipsters to put back each and every semicolon where it belongs: they are *delimiters*.
No ASI would force them to stop writing in those silly -and ugly- dialects in which every now and then lines *begin* with a semicolon...
As JS compiler *wants* semicolons as delimiters, instead of attempting to "guess" and "fix" buggy src code via A.S.I. which often results in failure anyway (even silent failures which is worse), it should better halt and complain loudly about syntax errors.
IOW, Javascrhipster's style code is nothing but a big multi line syntax error, fixed by ASI.
Happy new year!
More information about the es-discuss