[[Invoke]] and implicit method calls
bruant.d at gmail.com
Wed Sep 18 13:54:54 PDT 2013
Le 18/09/2013 20:52, Tom Van Cutsem a écrit :
> 2013/9/18 David Bruant <bruant.d at gmail.com <mailto:bruant.d at gmail.com>>
> An alternative to p3 and p4 would be to find a solution for the
> interaction between private state and proxies that also works with:
> A way that would make p1 work in essence (which very naturally you
> listed as the first idea ;-) ).
> Such a solution would also make invoke unnecessary.
> My example has nothing to do with private state per se. It's more
> generally about forwarding proxies reliably rebinding |this| to their
Are there other use cases than private state to rebinding |this| to the
... I just realized that in your examples, the private state is stored
in a weakmap which requires target identity. If I recall, the original
problem wasn't so much with weakmaps, but rather with Date instances
which is slightly different.
If solving weakmap lookups via |this| binding is worth solving, maybe we
need to start considering solving weakmap lookups via the receiver of
get and set traps, etc. As well as weakmap lookups via 1st, 2nd, 3rd,
What does make the 0th argument (this binding) so special?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss