On Mon, Apr 27, 2009 at 5:28 PM, Allen Wirfs-Brock
<[email protected]> wrote:
> 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.
I'm happy with that, so long as it's consistent with the definition of
for-in. However, the only relevant text I could find in for-in is
> Let P be the name of the next property of obj whose [[Enumerable]] attribute
> is true. If there is no such property, return (normal, V, empty).
Since these indexes are not actually properties of strings, this text
is insufficient.
--
Cheers,
--MarkM
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss