[Proxies] Refactoring prototype climbing in the spec

Tom Van Cutsem tomvc.be at gmail.com
Wed Nov 9 03:17:35 PST 2011

2011/11/8 Allen Wirfs-Brock <allen at wirfs-brock.com>

> I don't think that [[GetP]] and [[PutP]] need to be "internal methods"
> In spec'ing this I think I would make them be "abstract operations".
> Internal methods are extensions points that can be over-ridden on a per
> object basis.  That is what [[Get]] and [[Put]] provides.  GetP and SetP
> define fixed operations.

I proposed [[GetP]] and [[SetP]] as internal methods because Proxies would
"inherit" the built-in behavior for [[Get]] and [[Put]], but "override" the
[[GetP]] and [[SetP]] operations. If [[GetP]] and [[SetP]] become abstract
operations, won't they need to explicitly dispatch? Proxies could override
[[Get]] and [[Put]], but that would require them to duplicate the Object
[[Get]] and [[Put]] code.

> More generally, I think there should be a 1::1 correspondence between the
> internal methods in listed in ES5 Table 8 and fundamental proxy traps.

I absolutely agree we should strive to achieve this.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20111109/26a8b354/attachment.html>

More information about the es-discuss mailing list