Short Comparing proposal
Andrea Giammarchi
andrea.giammarchi at gmail.com
Wed Feb 1 19:18:04 UTC 2017
I understand, but you can also ternary within a ternary so why would this
have different capabilities ?
On Wed, Feb 1, 2017 at 7:12 PM, T.J. Crowder <
tj.crowder at farsightsoftware.com> wrote:
> On Wed, Feb 1, 2017 at 7:06 PM, Andrea Giammarchi <
> andrea.giammarchi at gmail.com> wrote:
>
>> Interesting. Would it play well nested too?
>>
>> ```js
>> if (x === 2 || (x === 3 && y === 1));
>>
>> // as
>>
>> if (x === (|| 2, (&& 3, y === 1)))
>> ```
>>
>
>
> ?
>>
>
> :-) I think at that point we're just creating an alternate expression
> syntax for JavaScript, which we probably want to avoid... Having the
> operands be Expression productions should be sufficient (which wouldn't
> allow that kind of nesting).
>
> -- T.J.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20170201/4c8a8124/attachment-0001.html>
More information about the es-discuss
mailing list