You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I filed tgrospic/rnode-client-js#16 asking @tgrospic to avoid it, but when I did so, I struggled to come up with any argument other than authority; i.e. Agoric says so (and Crockford used to say so). @tgrospic is (quite reasonably, as far as I can tell) pushing back.
The text was updated successfully, but these errors were encountered:
Given the stated rules -- never start a line with [, (, , +, *, /, -, ,, .,` -- and given high quality IDE support, which is plausibly as good as he says, I can believe that the hazard goes away. But that's a lot of work and narrow set of assumptions for questionable benefit. I'd rather invest my IDE engineering on real problems, of which we have plenty.
To answer your question, "What exactly is the hazard/risk?", it is that the programmer thought they wrote a program whose parse would give it one meaning but the machine runs it as a program with a different meaning based on a different parse. Without his restrictions and IDE support there are plenty of examples caused by ASI. Given his restrictions and IDE support, I don't know if there are any examples where ASI causes such ambiguity.
Here's a tricky non-ASI example. What does the following code do as a script? As a CJS module? As an EcmaScript module? As an EcmaScript module packaged up by your favorite packer, say rollup?
What exactly is the hazard / risk?
I filed tgrospic/rnode-client-js#16 asking @tgrospic to avoid it, but when I did so, I struggled to come up with any argument other than authority; i.e. Agoric says so (and Crockford used to say so). @tgrospic is (quite reasonably, as far as I can tell) pushing back.
The text was updated successfully, but these errors were encountered: