WeakMap better than Private Symbols? (was: direct_proxies "problem")
waldron.rick at gmail.com
Thu Jan 10 11:57:46 PST 2013
On Thu, Jan 10, 2013 at 11:22 AM, Nathan Wall <nathan.wall at live.com> wrote:
> // ES6 WeakMap
> let timeMap = new WeakMap(),
> // Store WeakMap methods to maintain integrity of the internal
> WeakMapGet = Function.prototype.call.bind(WeakMap.prototype.get),
> WeakMapSet = Function.prototype.call.bind(WeakMap.prototype.set);
Just a heads up, this is unnecessary and actually won't work at all.
WeakMap has nothing defined on its prototype property—all methods are
late-bound to the instance for the same reason you mention in the comment.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss