On Apr 21, 2013, at 11:03 AM, David Herman wrote:

> On Apr 21, 2013, at 8:55 AM, Allen Wirfs-Brock <[email protected]> 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
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to