Existential Operator / Null Propagation Operator

Kagami Rosylight saschanaz at outlook.com
Thu Oct 13 14:24:34 UTC 2016


>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.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20161013/99c16df2/attachment-0001.html>


More information about the es-discuss mailing list