Are internal data properties ever inherited?

Allen Wirfs-Brock allen at
Tue Oct 8 08:10:13 PDT 2013

On Oct 8, 2013, at 6:36 AM, Nathan Wall wrote:

>> Allen Wirfs-Brock wrote:
>>> 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. 
> What do you mean?

Sorry, I should have been clearer.  The dot notation is never used in the spec to refer to internal data properties.

As Claude pointed out, it is used to refer to the fields of the record specification type: 

Records are an abstract data structure used in the specification.  The do not correspond to ES Objects.  Their fields are neither object properties or internal data properties.

> Here are some examples where this notation is used in Rev. 19:
> + [[Call]] (thisArgument, argumentsList)
>   + Step 9.b.i.1 Set thisValue to calleeRealm.[[globalThis]].
> + [[DefineOwnProperty]] (P, Desc)
>   + Step 3.b Let oldLen be oldLenDesc.[[Value]].
> + Runtime Semantics: LabelEvaluation
>   + Step 2.f ... let V = stmt.[[value]]
> + 14.1.13 Runtime Semantics: IndexedBindingInitialisation
>   + FunctionRestParameter : ... BindingIdentifier
>     + Step 3 Let argumentsLength be status.[[value]].

The above are all references to Record fields, not to internal data properties.

> There acutlly appears to be only one occurance of "Set ... to ...".  Other occurrences say "Let ... be ...", so I should have used that terminology.  Apologies.
> I think I have my answer, though.  Internal implies own.

Yes and no! That's really the wrong way to think about it.  Internal data properties are *not* object properties.  The definition of properties in does not apply to them.  The concepts of own and inherited as defined in that section does not apply to them.  They are basically private per object state.  You will be on the road to confusion if you think about them as simply a specialization of ECMAScript object properties. 

"Internal" implies "this is not an property".;


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list