Existential Operator / Null Propagation Operator

joe joeedh at gmail.com
Mon Apr 6 19:45:46 UTC 2015

I hacked together something similar myself.  IIRC, this particular
transformation has issues with nested operators (e.g. a.b?.c.d?.e.f?.h).
Of course that's an implementation detail, but the problem (if I'm
remembering it right) is that people couldn't figure out what the
implementation constraints are (I think there was consensus that the
trinary transformation was unworkable), and without knowing those
constraints it wasn't possible to write a spec for it.

I could be remembering all this wrong, but that's my recollection of how
that conversation went.  I think the consensus was to wait for the ?
operator to become more mature in other languages.

On Mon, Apr 6, 2015 at 12:19 PM, Kevin Smith <zenparsing at gmail.com> wrote:

>> If we can come to an agreement on the existential operator for member
>> expressions, we would also be setting a precedent for other features
>> of the same family. For example, existential call expressions: `fn?()`
>> which would conditionally invoke `fn`.
> In the meeting notes you linked to, Waldemar (WH) noted that some of these
> variations may have grammar issues.
> Although not strictly ambiguous with conditional expressions, `fn ? ()`
> would require the use of YACG (yet another cover grammar).
> Also, what about computed property names?  For example:  `obj ?
> [Symbol.iterator]`.  I'm not sure that even YACG will help here.
> (Thanks for compiling the list of previous threads BTW).
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20150406/5fd730d2/attachment.html>

More information about the es-discuss mailing list