Hi - I hope I am not suggesting something that has been said before ~
Having Proxy and eventual Weak References makes it possible to build
Map/WeakMap in plain JS - nothing in hidden, 'native code' (C++).
I'd like to propose basing them off of these when Weak References are a 'thing'.
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)
So that's my idea. Toodles ~
PS: And build Set off of a Proxy + Array. Just stop being weird. :P
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss