Existential Operator / Null Propagation Operator

Brendan Eich brendan at mozilla.org
Tue Apr 7 05:00:23 UTC 2015

That (putting the ? second) works for . ( and [, true. It's backwards 
compared to other languages, though. Oh well.

The deeper issue is semantic, assuming a viable syntax. See ksmith's 
latest message.


Ron Buckton wrote:
> Wouldn't `.?` as an infix operator be unambiguous, compared to `?.`? There's no place other than decimal literals where this would be legaltoday,  and decimal literals already require either parenthesis or an extra dot to perform a property access in any event. With that lexeme, `x.?1:y` would be unambiguously an error. `1.?x:y` is unambiguously a conditional, while `1..?x:y` is unambiguously a null-propagating property access on the numeric literal `1.`.
> Ron

More information about the es-discuss mailing list