Refutable pattern

Oliver Hunt oliver at apple.com
Wed Feb 6 11:04:08 PST 2013


On Feb 5, 2013, at 11:00 PM, Brendan Eich <brendan at mozilla.com> wrote:

> Sorry if I was a thread-killer, posting four times in a row.
> 
> On balance we have:
> 
> prefix-? pros:
> * LR(1) grammar without ambiguity or lookahead restriction.

What's the production that takes this out of LL(1)?

> 
> prefix-? cons:
> * ASI hazard if ? starts an intended destructuring assignment expression.

That's interestingly icky.

> 
> suffix-? pros:
> * Matches CoffeeScript
I don't really consider that a pro, any more than matching any other language.  This obsession with coffee script comparisons isn't useful.
 
I think prefix ? is easier from a reading point of view, but I'm not really married to either.

--Oliver


More information about the es-discuss mailing list