Existential Operator / Null Propagation Operator

Isiah Meadows isiahmeadows at gmail.com
Thu May 19 19:55:46 UTC 2016


I will note that JavaScript does already require n-token lookahead worst
case to disambiguate arrow functions from sequence expressions.

```js
foo((a, {b}) => b)
foo((a, {b}) <= b)
```

Also, that proposal is not syntactically ambiguous, since numbers are not
allowed to start an identifier.

On Thu, May 19, 2016, 13:10 Claude Pache <claude.pache at gmail.com> wrote:

> Le 19 mai 2016 à 18:46, John Lenz <concavelenz at gmail.com> a écrit :
>
> It is a parser problem:
>
> obj.prop?.2:.1
>
> You need arbitrary look ahead to disambiguate ?. from ?: solve the problem.
>
>
> No, you just need a one-character lookahead checking for a digit.
>
> The response of the original question is "mu", because it *is* possible.
>
> —Claude
>
>
>
> On Tue, May 10, 2016 at 10:32 AM, <mads.k at jubii.dk> wrote:
>
>> Why isn't it possible to use the obj.property?.sub syntax in combination
>> with lookahead as suggested by Brendan Eich 4 years ago?
>>
>> http://wiki.ecmascript.org/doku.php?id=strawman:existential_operator
>>
>>
>> _______________________________________________
>> es-discuss mailing list
>> es-discuss at mozilla.org
>> https://mail.mozilla.org/listinfo/es-discuss
>>
>>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20160519/151ffbf9/attachment.html>


More information about the es-discuss mailing list