On Tue, Jun 12, 2012 at 5:29 PM, T.J. Crowder <t...@crowdersoftware.com> wrote: > In the current default operator strawman[1], the operator is ??, e.g.: > > a = b ?? 5; > > is shorthand for > > a = b !== undefined ? b : 5;
I missed this discussion. What validates the introduction of this syntax over the equally simple and already possible `a = b || 5`? Is the comparison to `undefined` (and why not `==null` as well??) really worth the introduction (and subsequent loss of future usage) of the double question mark? Whatever it's usual name is (double wat?). > > Would it be possible to use ||| instead? E.g.: > > a = b ||| 5; If the above is "this, absolutely" and such a feature, I favor this as well because it resembles the `a = b || 5` expression better. > [1] http://wiki.ecmascript.org/doku.php?id=strawman:default_operator (Read that before posting, did not see anything compelling) - peter _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss