Proposal: Abstract References

Kevin Smith zenparsing at
Wed Oct 22 18:30:11 PDT 2014

> My initial worries are largely around the ergonomics---both for authors
> and implementers---if this is our solution for private state. In
> particular,  I don't think having to create a new WeakMap for every private
> "member" is very author-friendly.

Even without "private" sugar, I think we could use some Proxy-foo to make
this more pleasant:

    const Private = new Proxy({}, get() { return new WeakMap });

    const { _x, _y } = Private;
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list