May 24-26 rough meeting notes
brendan at mozilla.com
Fri May 27 18:42:34 PDT 2011
On May 27, 2011, at 6:20 PM, Waldemar Horwat <waldemar at google.com> wrote:
>> This produces expressions such as 42 = foo(), which must be handled by semantic specification. Why can't we have a more precise grammar?
> This is an entirely different issue. The LeftHandSideExpression is still evaluated as an expression; you just don't call GetValue on it. We chose to prohibit 42 = foo(); we could equally well have chosen to prohibit foo = 42(), but neither situation has much to do with the grammar.
That dodges the big "cover grammar" vs. Precise Grammar issue before us. It assumes the conclusion tha semantics such as Reference internal types are the way to go, because LR(1) can't hack it.
> Given that LR(1) is the most general grammar available before you start getting into serious complexity (it subsumes LALR and other commonly studied grammars),
Again, *all* real JS engines use top-down parsers, including v8.
> there is a big cliff here and I think it's foolish to plan to jump off it without completely understanding the consequences.
Agreed. Let's understand them, or use Expression as a cover grammar -- just like LetHandSideExpression (which produces NewExpression, a real jswtf).
> This is especially true because there are other paths available for compact function syntax that do not involve jumping off that cliff.
> I realize that C++ and Perl put up with ambiguity, and it seriously bites them. Quick, what's the difference between the following in C++?
> int x(int());
> int x(-int());
Yet C++ is wildly successful inside Google and outside. Trade-offs...
> es-discuss mailing list
> es-discuss at mozilla.org
More information about the es-discuss