2013/9/19 Allen Wirfs-Brock <[email protected]> > I really don't think we need to debate this much longer. We just need to > stay the course with [[Invoke]] and I can update the spec. to replace > [[Get]]+[[Invoke]] rather than [[Get]]+[[Call]] for this conditional > situations. I may also added add a note suggesting that the extra [[Get]] > can be eliminated. >
Refactoring [[Get]]+[[Call]] to [[Get]]+[[Invoke]] seems fine by me. It better expresses the intent, and the change should only be observable to proxies. Re. the fact that |proxy.method.call(proxy)| would not re-bind |this|: I've come to think that if |this|-rebinding is crucial to your proxy's use case, you probably need to go "all the way" and just use membranes. Membranes contain all the necessary logic to rebind |this| as well as any other parameters. That said, I believe we could do strictly without invoke(), but given that method invocation is so primary to JS, I believe we make the right choice by exposing it in the MOP. By comparison, we also added a has() trap to trap the in-operator, while we could have also just triggered a series of more fundamental traps to figure out the result, and the in-operator is far less common than method invocation in a typical JS program. Regards, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

