Existential Operator / Null Propagation Operator
Claude Pache
claude.pache at gmail.com
Thu Oct 29 22:00:19 UTC 2015
>> Le 29 oct. 2015 à 21:04, Waldemar Horwat <waldemar at google.com> a écrit :
>>
>> On 10/29/2015 12:19, Laurentiu Macovei wrote:
>> `foo?.bar` and `foo?['bar']` syntax would work too.
>
> No. It would break existing code:
>
> x = foo?.3:.5;
That could be resolved by a simple lookahead, I think.
>
> x = foo?[a]:[b];
That one is more problematic. IIRC, it was once suggested to use`?.[` instead.
—Claude
>
> On the other hand, turning .. into a token should be fine.
>
> Waldemar
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
More information about the es-discuss
mailing list