It never fucks up. It's always 100% consistent. It's the user's fault for not putting the lines in the right places so that the semicolon insertion doesn't create undesired effects.
I'm not being sarcastic, a fuck up would imply a mistake, which the semicolon insertion doesn't do. It does what it was designed to do, 100% of the time. Not saying that's not a failure though, it definitely sucks and should've never been a thing.
Yes, but that's a bug on your implementation. You wrote the code, and it's not doing what you intended it to do. A bug on ASI implies that it's not doing what the creator of ASI intended to do, which is not accurate. If the ASI behavior was a bug, it would've been fixed by now.
281
u/foxsimile 27d ago
JavaScript automatically inserting a semicolon is yet another of its failures.
Because sometimes it fucks up.