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

Herby Vojčík herby at mailbox.sk
Sun Jan 6 03:46:02 PST 2013



Kevin Smith wrote:
>
>     I raised this problem-case, so I want to point out that we could
>     take other courses:
>
>     * Reckon that labels are rare and this won't bite, so let it stand,
>     just as
>
>     a = b
>     (c)
>
>     is a hazard today -- and one that bites much more.
>
>     * Don't allow suffix-? to be followed by a newline.
>
>
> Leaving aside ASI for a moment, there are other issues:
>
>      let v = obj?+(0+1+2+3+4+5+6+7+8+9+...+n):null;

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.

> We don't know whether this is a conditional expression or not until we
> get to the ":" an arbitrary distance away from the "?".  We might be
> able to use another cover grammar approach here, but is it worth it?
>
> { Kevin }

Herby


More information about the es-discuss mailing list