On Tue, Apr 19, 2011 at 11:02, Garrett Smith <dhtmlkitc...@gmail.com> wrote:
> On 4/19/11, Brendan Eich <bren...@mozilla.com> wrote:
> I don't mean to annoy by repeating the same things, but here goes: Is
> `()` Grouping Operator or Arguments? Is `[]` ArrayLiteral or Property
> Accessor? Or do these cases depend on the preceding token?

They depend on the preceding token, *and* they cause a preceding \n to
be elided.  That is the problem with JavaScript's statement
termination rules with respect to lines that start with +, /, *, -, (,
or [.

> Now concatenate a.js and b.js and you have:
> var MyWidget = function(){
>  this.name = "mike";
> }(function() {});

That error isn't caused by ASI.  Disabling ASI won't prevent that error.

That error is caused by the lack of ASI.  It's caused by the \n being
elided when the next line starts with a (.

>> So any statement of the form "... ASI changes program behavior WRT
>> unrestricted productions is bigger problem" is simply misstated.
>>
> See above.

ASI didn't change the program behavior.  ASI didn't happen in that example.

Newline elision changed the program behavior.

--i
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to