[Harmony Proxies] Proposal: Property fixing

Allen Wirfs-Brock allen at wirfs-brock.com
Fri Jun 17 16:52:15 PDT 2011


Mark,
I don't want to argue about the specific invarients you listed.  They generally make sense.  However I don't believe that they are as firmly embedded in the fabric of ES as your believe.

Prior, to ES5 attribute value were not reified and there were no way for ES code to specify attribute values for properties.  I believe (I'm where where I can't check) that [[DefineOwnProperty]] didn't exist prior to ES5.  Argurably Host objects were not required to even have property attributes.  They simply needed to provide [[PUT/Get]] behaviors and there were minimal constraints on what they implemented. Some widely used host objest (DOM NodeList) have behaviors that are tough to match to the normal interpretation of the attributes.

In ES5 we added [[DefineOwnProperty]] as an internal method and incorporated into it the attribute transtion rules you quoted.  However as an internal method it can have other "native" implementations that implement other rules.  I don't believe there is any contrary spec. language.  We did put in the host object invarients but I don't believe we actually talked about expanding there applicability to all objects.

I'm not saying it is necessarily a bad idea.  I just don't think it is implicit in ES5.

Allen







More information about the es-discuss mailing list