es7 proposal/polyfill?: base Map/WeakMap off Proxy + Weak References

Thomas thomasjamesfoster at bigpond.com
Fri Feb 19 12:41:15 UTC 2016


> Map's API could just go away and follow traditional Object assignment
> and existence checks:
> 
> map[key] = value;
> 
> // wish JS had a null-coalescing `?` operator like Coffeescript..
> if (map[key] !== undefined || map[key] !== null) { ... }
> 
> It's totally legal in non-Node JS to have Objects as keys in other
> Objects, right? (I forget)

Not sure where you got that idea, but aren't the objects just being converted to string property names?

> So that's my idea.  Toodles ~
> 
> PS: And build Set off of a Proxy + Array.  Just stop being weird. :P
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss


More information about the es-discuss mailing list