[Proxies] Refactoring prototype climbing in the spec

Allen Wirfs-Brock allen at wirfs-brock.com
Thu Nov 10 08:41:15 PST 2011


On Nov 10, 2011, at 1:26 AM, Tom Van Cutsem wrote:

> 
> Are you sure you want to kill [[HasProperty]] entirely? If we replace it by a conditional [[Get]], wouldn't that mean that the expression |name in obj| might unnecessarily trigger an accessor in obj?
> 

Good point, I didn't think about the fact that [[Get]]  always triggers accessor calls.

We probably do need to continue to have a side-effect free [[HasProperty]].  I still think it is desirable to have a conditional [[Get]] available for use in places like the array algorithms. Whether it is an over-roading of the [[Get]] api or an additional trap is debatable.

Allen


More information about the es-discuss mailing list