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.
/be
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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss