Fwd: Object.prototype.__proto__

Axel Rauschmayer axel at rauschma.de
Fri Sep 28 07:50:00 PDT 2012


My bad, I sent the previous email to es-discuss-owner instead of to es-discuss. Forwarding Brendan’s answer to everyone.

Begin forwarded message:

> From: Brendan Eich <brendan at mozilla.com>
> Subject: Re: Object.prototype.__proto__
> Date: September 28, 2012 16:25:06 GMT+02:00
> To: Axel Rauschmayer <axel at rauschma.de>
> Cc: es-discuss-owner at mozilla.org
> 
> Axel Rauschmayer wrote:
>> It is my understanding of B.3.1 that Object.prototype.__proto__’s only use is as a flag to switch off __proto__ for all objects (I’m assuming in settings similar to Caja). Wouldn’t it be better to introduce a real boolean flag, along with a unique name object?
> 
> No.
> 
> First, __proto__ is what it is, a de-facto standard (albeit with non-configurability in some implementations, a bug to fix), and adding some new switch elsewhere won't change things. So what you propose is redundant (given configurability).
> 
> Second, what's wrong with |delete Object.prototype.__proto__| as the explicit, symbol-free (symbol = unique name) way of turning off __proto__ for a given global object and object graph generated within that scope? It's simpler and more direct than setting some other property for a side-effect.
> 
> The only issue remaining with __proto__ is whether it is a magic data property, or an accessor with poisoned get and set pills on reflection.
> 
> /be
> 

-- 
Dr. Axel Rauschmayer
axel at rauschma.de

home: rauschma.de
twitter: twitter.com/rauschma
blog: 2ality.com

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20120928/51ae5fee/attachment.html>


More information about the es-discuss mailing list