Existential Operator / Null Propagation Operator

Isiah Meadows isiahmeadows at gmail.com
Thu Oct 13 15:01:57 UTC 2016


IIRC the proposed syntax for computed properties was `x?.[y]`, to avoid the
ambiguity.

On Thu, Oct 13, 2016, 10:24 Kagami Rosylight <saschanaz at outlook.com> wrote:

>
>
> >The token ?. works fine
>
>
>
> I think more than half of this thread is about syntactic ambiguity,
> regardless of whether the ambiguity is real or not. For example, from [an
> earlier post of this thread](
> https://esdiscuss.org/topic/existential-operator-null-propagation-operator#content-44
> ):
>
>
>
> >But what should be done with cases like obj?[1]?[2]:[3].
>
>
>
> A formatter may help this and make it `obj?[1] ? [2] : [3]` or `obj ?
> [1]?[2] : [3]` depending on operator precedence, but shouldn’t it be more
> clear? `obj![1]?[2]:[3]` will not be confused with ternary operator.
>
>
> _______________________________________________
> 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/20161013/7122b3ff/attachment.html>


More information about the es-discuss mailing list