Are internal data properties ever inherited?
claude.pache at gmail.com
Tue Oct 8 03:59:44 PDT 2013
Le 8 oct. 2013 à 07:21, Allen Wirfs-Brock <allen at wirfs-brock.com> a écrit :
> On Oct 7, 2013, at 8:05 PM, Nathan Wall wrote:
>> Set foo to bar.[[Baz]]
>> Does `foo` ever result in a non-undefined value if `bar` doesn't have an own `[[Baz]]` property but inherits from an object that has an internal `[[Baz]]` property?
> I couldn't say, as this notation is never used in the ES specification. Hence it means whatever the person who wrote it wants it to mean.
It may be useful to recall that there are different concepts in the spec that have a name enclosed in double square brackets. I have found these three:
* attributes of object properties (Section 126.96.36.199) ;
* internal methods and internal data properties of objects (Section 188.8.131.52) ;
* fields of records (Section 6.2.2) .
Among those concepts, the notation `O.[[X]]` is defined (and, I presume, used) only for fields of records. But there is some risk for the reader to accidentally extend this notation to internal data properties of objects.
> es-discuss mailing list
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss