Proxying built-ins (Was: [[Invoke]] and implicit method calls)
Mark S. Miller
erights at google.com
Wed Sep 25 12:50:09 PDT 2013
That's why I picked on Date. We need to distinguish formerly-internal
potentially-public state from genuinely private state. WeakMap is
(ironically) a great example of an abstraction whose internal state must
On Wed, Sep 25, 2013 at 7:22 AM, David Bruant <bruant.d at gmail.com> wrote:
> Le 25/09/2013 15:49, Mark S. Miller a écrit :
> Why does Date need private state? AFAICT, it only needs uniquely named
>> state. Why not do what we've done for many other bits of internal state
>> that doesn't need to be private: just name it with a unique symbol?
> yes (assuming unique symbols are a thing in the end. I think there were
> threatened. unique string could work though)
> This doesn't work for all internal state of course
> yes. I think that in all this discussion, Date is a representant of
> built-ins that have private state. WeakMap internals really can't be
> exposed as unique properties for instance.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss