Le 8 oct. 2013 à 07:21, Allen Wirfs-Brock <al...@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 6.1.7.1) [1];
* 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. 

—Claude

[1] http://people.mozilla.org/~jorendorff/es6-draft.html#sec-property-attributes
[2] 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-object-internal-methods-and-internal-data-properties
[3] 
http://people.mozilla.org/~jorendorff/es6-draft.html#sec-list-and-record-specification-type


> 
> Allen
> 
> 
> _______________________________________________
> es-discuss mailing list
> es-discuss@mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss

_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to