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 6.1.7.1) [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 6.1.7.2) [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?

/be
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to