names [Was: Approach of new Object methods in ES5]

David Herman dherman at
Fri Apr 16 21:06:09 PDT 2010

> A Name object that is required to be a leaf in the live object graph has the advantage that it can be strongly referenced by the implementation when used as a property name (key), without reference cycles being possible. Implementations would be able to count on this property. We could choose to specify Names this way, and the current spec seems to lean this way.

Good points. Correct me if I'm wrong, but it also seems an implementation could be free to GC object slots for unreachable leaf-name-keys. IOW, being a property-key does not imply reachability. (For strings this is obviously not true, since they are forgeable.)

> Also, we don't want to couple proposals at this point if there is no semantic win in doing so.

>> PS Still, I have my doubts about using any such mechanisms for versioning.
> The topic is not versioning in full, rather hiding properties added to built-in prototypes.

I had the impression Tucker was thinking about versioning, but I may have imagined it. I guess I'm not clear on what desiderata the names proposal as-is doesn't address. Tucker mentions enumeration, but I'm not sure how important that is. It doesn't seem like a common need, but might be an interesting reflective operation.


More information about the es-discuss mailing list