Are internal data properties ever inherited?

Allen Wirfs-Brock allen at
Tue Oct 8 10:53:24 PDT 2013

On Oct 8, 2013, at 10:38 AM, Brendan Eich wrote:

> Claude Pache wrote:
>> 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 [1];
> Note this is an ES5 change from ES1-3, which used DontDelete, DontEnum, and ReadOnly without [[]] brackets.
>> * internal methods and internal data properties of objects (Section [2];
>> * fields of records (Section 6.2.2) [3].
>> 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.
> I agree on risk of confusion. Distinct notation for notably distinct spec constructs seems best. Just [[]]-bracketing all spec-level or unreflected meta-level names does not achieve any particular goal, and we don't do that anyway.
> In contrast to programming languages hindered by QWERTY and ASCII legacies, the Spec has lots of typographic expressiveness to choose from. True, ASCII transcriptions and mockups would be harder, but some alternative brackets (chevrons) have digraphs (<< and >>). And perhaps just a few nice font choices and no brackets (which add non-trivial visual noise) would be better for some use-cases.
> Allen, what do you think?

I generally agree but, I'm also much more focused right now on getting the ES6 spec. feature complete than I am on notational cleanups.

For now, I think it is probably adequate to clarify that [[ ]] is always used to  designate meta-level specification names.  There has also been enough confusion about the differences between meta-level "internal data properties" and ECMAScript language "data properties" to justify a global renaming of "internal data property" to "internal data field" (or perhaps "internal data slot", I'm concern about possible confusion with "fields" of the Record specification type).


More information about the es-discuss mailing list