Object property for-in enumeration as an internal method

Allen Wirfs-Brock allen at wirfs-brock.com
Tue Mar 15 11:40:35 PDT 2011

This seems like an issue for the next major edition rather than a correctable "error" for ES5/5.1.

However, feel free to submit a bug at bugs.ecmascript.org.  That will capture the issue so it can be address in a future edition.


On Mar 12, 2011, at 2:45 PM, David Bruant wrote:

> Hi,
> I think it would be worth for spec readability to give a name to the for-in property enumeration internal method and list it as such in ES5 8.6.2 Table 8 regardless the fact that it is implementation-dependent. From the spec edition point of view, it would require a bit of re-writing for the for-in statement semantics algorithm.
> I have noticed that there is no mention of this internal method in Allen's resource (http://www.wirfs-brock.com/allen/things/es5-technial-notes-and-resources). For the record, this internal method is "called" in (at least I haven't found any other place):
> * 12.6.4 The for-in Statement (twice)
> * Object.defineProperties
> * Object.keys
> It would probably help to define more easily how proxies reify Object.keys. The 'enumerate' trap would just reify this new internal method ( [[enumerate]]? ) and as such there would be no need to modify the for-in statement definition as it is in http://wiki.ecmascript.org/doku.php?id=harmony:proxies_semantics#modifications_to_the_evaluation_of_expressions_and_statements.
> David

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20110315/eabe8301/attachment-0001.html>

More information about the es-discuss mailing list