Private symbols as WeakMap sugar

Allen Wirfs-Brock allen at
Wed Jan 16 12:27:38 PST 2013

On Jan 16, 2013, at 11:28 AM, Brendan Eich wrote:

> Allen Wirfs-Brock wrote:
>> If you want to explore this area, I suggest taking a fresh look at
> How does that help? It does not transpose terms of [] and delegate to the left (formerly right) operand.

No, but it presents a more general way to make [ ] extensible. And, a @elementGet/@elementSet method, as defined in the proposal, could indeed choose to do that sort of transposition.

If you wanted to "bake-in" this specific Weakmap inverted implementation (about which I'm obviously still quite skeptical) it could be included in the default fall-back behavior that is used if a @elementGet/@elementSet implementation is not found.


More information about the es-discuss mailing list