2011/11/9 Allen Wirfs-Brock <[email protected]> > [[Get]] seems to do nothing but redispatch to [[GetP]] so its definition > could be replaced with the body of [[GetP]]. > > [[Puit] does a redispatch to [[SetP]] followed by a "mode" based > conditional throw depending upon the result of the [[SetP]]. I din't think > the the throwing behavior needs (or even should) be over-ride able by a > proxy (or even by an alternative internal implementation). I would factor > the conditional throw code out of [[Put]] and make it the responsibility > of the caller. In practice, this just means that I would define a new > Abstraction Operation that is used in place of direct calls to [[Put]]. > The abstraction operation wold essentially have the definition you provide > for [[Put]] except that it would call [[Put]] instead of [[SetP]] and the > definition of [[Put]] would be replaced with the body of [[SetP]] >
Agreed. So if I understood all of that correctly, we would have: - Abstract [[GetProperty]] and [[SetProperty]] operations (the methods I called [[GetP]] and [[SetP]]) - Object.getProperty and Object.setProperty built-ins that call [[GetProperty]] and [[SetProperty]] - [[Get]] and [[Set]] methods on Objects that call [[GetProperty]] and [[SetProperty]] - [[Get]] and [[Set]] methods on Proxies that trigger "get" and "set" traps - An abstract operation [[Put]](O, P, V, Throw) that calls O.[[Set]](O,P,V) and performs the "strict mode" reject behavior. Cheers, Tom
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

