Where is it specified that new objects are empty, if it is?

Andreas Rossberg rossberg at google.com
Mon Mar 18 09:51:00 PDT 2013


On 18 March 2013 17:43, Brendan Eich <brendan at mozilla.com> wrote:
> Andreas Rossberg wrote:
>> In the process of adopting the new __proto__ semantics, we have
>> recently changed it to be a magic data property on Object.prototype.
>> In a next step, we will make it a proper JS accessor property.
>
> Are you poisoning reflection, or returning poison-pill getter and setter?

Currently neither -- because __proto__ is a magic data property, you
cannot extract any getter/setter. When you read the property
descriptor, though, its .value is null.

(Also, a funny side effect of the magic is that making that property
non-writable will prevent you from setting prototypes via __proto__.)

/Andreas


More information about the es-discuss mailing list