fail-fast object destructuring (don't add more slop to sloppy mode)

Herby Vojčík herby at mailbox.sk
Sun Jan 6 04:11:50 PST 2013



Kevin Smith wrote:
>
>
>     Is it bad to specify that unless it is at the end of (sub)Expression
>     or before dot, '?' is treated as first ? in ?: ? Then you have to
>     explicitly parenthesize it and that's all.
>
>
> How do you specify "end of expression", though?  You have to consider
> ASI here as well.  Is the complexity you suggest worth it?

ASI here as well :-/ hm, yes.
It is complicated.

The only solution I see now is abandon deatiled grammar solution, move 
to higher point of view, treat ? always as ?:, and if the next thing you 
see is a dot or end of subexpression (by any means), make it 
"existential ?".

It is probably what you are saying by "not worth the complexity".

> { Kevin }

Herby


More information about the es-discuss mailing list