On 14 June 2012 19:01, Brendan Eich <bren...@mozilla.com> wrote: > The users who want null to be distinct from undefined are neither > CoffeeScript users, nor || users (in their defaulting code). They must be > doing === undefined test. >
Not quite. I use || whenever I can in my defaulting code, and I can use it a lot (e.g., when the optional item must be an object). I only use the long-winded version if I have to because 0, "", false, or null is a valid possible value -- which is surprisingly rare. Hugely looking forward to using ?? uniformly instead, but it's not accurate to say that we who don't want undefined and null equated in this context are therefore not using ||. -- T.J.
_______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss