> 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; 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? > > You must have meant (2). > Yep! > > Apart from deviating from the cowpath (CoffeeScript), prefix-? is > equivalent to suffix-? as I argued in reply to Herby. We'd want to support > > let ?{p: v} = o; > let v = ?o.p; > > to handle the case of undefined or null 'o', of course, in which case v > would be initialized to undefined. > Would we? This is something a little different than "irrefutable property get". Thinking... { Kevin }
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss