Existential Operator / Null Propagation Operator

Claude Pache claude.pache at gmail.com
Thu Oct 13 16:07:26 UTC 2016


> Le 13 oct. 2016 à 17:14, Kagami Rosylight <saschanaz at outlook.com> a écrit :
> 
>  
> >IIRC the proposed syntax for computed properties was x?.[y],
>  
> Yes you’re right, sorry :/
>  
> IMO it still seems the syntax problem is the main reason why this proposal has stalled. If not, what is the problem here?

The issue with `?.[` is that it is considered as not pretty by some people. A syntax that is at the same time pretty, technically working, and not confusing is difficult to find.

Concerning your suggestion of using `!`: From a technical point of view, using `![` instead of `?.[` may work only if you forbid a line terminator before the `!`, because the following program is valid as of today (with implied semicolons):

```js
foo
![42]
```

> I’m curious why this proposal is not even listed in stage 0 proposal list.

Because no representative of TC39 has volunteered to champion it.

—Claude

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


More information about the es-discuss mailing list