Allen Wirfs-Brock (2013-04-21T18:32:57.000Z)
On Apr 21, 2013, at 11:03 AM, David Herman wrote:

> On Apr 21, 2013, at 8:55 AM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> 
>> Deleting Object.prototype.__proto__ will not be be specified as disabling {__proto__: foo}.
> 
> Was that what we'd agreed to? I hadn't remembered that. I don't like it because it's special-case syntax, but I can also live with it since it's no more powerful than Object.create().
> 
> Do you know of a meeting minutes where we might have captured that decision?

Don't know, we have talked about it before.

It is special-case syntax that requires special case semantics because object literals use [[DefiineOwnProperty]] rather than [[Set]] as the semantics of  {key : value}. So {__proto__:value} and {"__proto__": value)  really are special syntax.

Making it conditional on the status of Object.prototype.__proto__ does make it less special, it just make the semantics even more complex.  It also makes the semantics of an object literal dependent upon what is essentially a remote global switch.  So, nobody can reliably use that form of object creation unless they control every bit of code that runs in their application.

What possible benefit would there be in tying the runtime behavior of this syntax to the existence of Dunder proto?

Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130421/74fcd8dd/attachment.html>
github at esdiscuss.org (2013-07-12T02:26:56.856Z)
On Apr 21, 2013, at 11:03 AM, David Herman wrote:

> On Apr 21, 2013, at 8:55 AM, Allen Wirfs-Brock <allen at wirfs-brock.com> wrote:
> 
>> Deleting `Object.prototype.__proto__` will not be be specified as disabling `{__proto__: foo}`.
> 
> Was that what we'd agreed to? I hadn't remembered that. I don't like it because it's special-case syntax, but I can also live with it since it's no more powerful than `Object.create()`.
> 
> Do you know of a meeting minutes where we might have captured that decision?

Don't know, we have talked about it before.

It is special-case syntax that requires special case semantics because object literals use [[DefiineOwnProperty]] rather than [[Set]] as the semantics of  `{key : value}`. So `{__proto__:value}` and `{"__proto__": value}`  really are special syntax.

Making it conditional on the status of `Object.prototype.__proto__` does make it less special, it just make the semantics even more complex.  It also makes the semantics of an object literal dependent upon what is essentially a remote global switch.  So, nobody can reliably use that form of object creation unless they control every bit of code that runs in their application.

What possible benefit would there be in tying the runtime behavior of this syntax to the existence of Dunder proto?