[[Invoke]] vs [[Get]]

Tom Van Cutsem tomvc.be at gmail.com
Mon Jun 10 01:22:40 PDT 2013

2013/6/9 Juan Ignacio Dopazo <dopazo.juan at gmail.com>

> It seems like the right reasoning. The result of these operations should
> be equivalent:
> obj.f();
> let f = obj.f;
> f.call(obj);

These operations will still be equivalent for:
- a proxy that implements both "get" and "invoke" in a consistent way.
- a proxy that implements neither "get" nor "invoke" (the default will be
to forward in both cases)
- a proxy that subclasses DelegatingHandler [1] and only overrides "get"

If a proxy implements "get" and "invoke" in ways that are not mutually
consistent, then those operations will not be equivalent. But there are
many, many other cases where proxies can already do similar such things.


[1] http://wiki.ecmascript.org/doku.php?id=harmony:virtual_object_api
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130610/d3e0372c/attachment.html>

More information about the es-discuss mailing list