The Existential Operator

Axel Rauschmayer axel at
Thu May 22 10:39:12 PDT 2014

> Dmitry Soshnikov wrote:
>> Will the "Existential Operator" for properly accessors be something interesting to consider for ES7 spec? Currently CoffeeScript uses it well.
> Please see
> and find "ARB: This is non-compositional".

David seems to suggest a compositional version: `o?.p?.q?.r`

I’m assuming that the left-hand side of `value?.prop` is an arbitrary value and that the property access is only made if that value is neither `undefined` nor `null`. AFAICT that’s also how CoffeeScript’s existential operator works.

I’m ambivalent about it, though: it would be useful, but would also add complexity to the language.

Dr. Axel Rauschmayer
axel at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list