As currently specified, they are to be enumerated by for-in. This is 
intentional and I believe we discussed it at some past TC-39 meeting. If we are 
treating the string characters as indexible readonly properties then for-in-ing 
over them seems like a perfectly reasonable thing to do.  This is one of the 
advantages of using [[GetOwnProperty]] in this manner rather than trying to 
support direct string indexing using some other specification mechanism -- they 
just naturally integrate into property access anywhere it occurs in the 
specification.  

>-----Original Message-----
>From: [email protected] [mailto:es5-discuss-
>[email protected]] On Behalf Of Mark S. Miller
...
>
>15.5.5.2 [[GetOwnProperty]] ( P )
>
>> 9. Return a Property Descriptor { [[Value]]: resultStr,
>[[Enumerable]]: true, [[Writable]]: false, [[Configurable]]: false }
>
>Since these numeric pseudo-properties are not enumerated by for-in
>loops, we should describe them as non-enumerable.
>

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to