Proxying built-ins (Was: [[Invoke]] and implicit method calls)

David Bruant bruant.d at gmail.com
Wed Sep 25 07:22:53 PDT 2013


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.

David


More information about the es-discuss mailing list