Re: Feedback on the [[HasProperty]] refactoring

2012-09-19 Thread Tom Van Cutsem
For the record, I updated the [[HasProperty]] algorithm on the wiki to call [[HasOwnProperty]] instead of [[GetOwnProperty]], as suggested. 2012/9/17 Tom Van Cutsem tomvc...@gmail.com Hi David, In the ES5 world, [[HasOwnProperty]] or [[GetOwnProperty]]+check if prop !== undefined is

Feedback on the [[HasProperty]] refactoring

2012-09-17 Thread David Bruant
Hi, I'm talking about http://wiki.ecmascript.org/doku.php?id=harmony:proto_climbing_refactoring#refactoring_hasproperty The 2 first steps of the proposed algorithms are: 1. Let prop be the result of calling the [[GetOwnProperty]] internal method of O with property name P. 2. If prop is not

Re: Feedback on the [[HasProperty]] refactoring

2012-09-17 Thread Tom Van Cutsem
Hi David, In the ES5 world, [[HasOwnProperty]] or [[GetOwnProperty]]+check if prop !== undefined is equivalent, but proxies make visible the difference and in the context of the in operator, hasOwn seems like a more relevant trap to call instead of getOwnPropertydescriptor. Agreed. And not