3 ms·
> These are weasel words. No, actually, that's how it works in JS. ASI doesn't "work" in all cases because a line break doesn't always indicate the end of a st
by ahoyhere 15y ago
> These are weasel words.
No, actually, that's how it works in JS. ASI doesn't "work" in all cases because a line break doesn't always indicate the end of a statement. No less than Brendan Eich wrote this himself, in his blog post reply to the whole "semicolongate" which happened a couple weeks ago.
I'm sure it feels good to be all righteously angry… but it helps to be right.
- slexaxton 15y agoBrendan's other words included: > My two cents: be careful not to use ASI as if it gave JS significant newlines. http://brendaneich.com/2012/04/the-infernal-semicolon/ http://brendaneich.com/2012/04/the-infernal-semicolon/
- ahoyhere 15y agoYes, and that's an opinion. And he doesn't say it is a fact.
- MatthewPhillips 15y agohttp://www.thefreedictionary.com/weasel+word http://www.thefreedictionary.com/weasel+word > Weasel word: An equivocal word used to deprive a statement of its force or to evade a direct commitment. From the article, emphasis mine: > A linebreak indicates, in most cases, the end of a statement;
- ahoyhere 15y agoThat's like saying that "Car crashes, in most cases, are not fatal" is weasel words at work, when in fact it's simply a fact. Car crashes are not fatal, in most cases. And in JS, a line break indicates the end of a statement, in most cases. It's in the spec for ASI.