||= is much needed?
dherman at mozilla.com
Sun Jun 17 07:17:42 PDT 2012
On Jun 15, 2012, at 5:57 PM, satyr wrote:
> On Sat, Jun 16, 2012 at 4:33 AM, David Herman <dherman at mozilla.com> wrote:
> As for null, I can see how there's confusion about whether to use null vs undefined, and so I can see why CoffeeScript would just try to blur the distinction between them.
> Not just for blurring. Rejecting `null` is essential for CoffeeScript's "existence" due to `?.`, the soak/safe access operator.
I think you could make a case for ?. defaulting for both but ?? defaulting only undefined. The case goes something like this:
- The purpose of ?. is to fail soft when doing a property lookup. Both null and undefined throw when doing a property lookup.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss