B.3.1 The __proto__ pseudo property

Mark S. Miller erights at google.com
Sun Apr 21 18:25:25 PDT 2013


On Sun, Apr 21, 2013 at 6:21 PM, Allen Wirfs-Brock <allen at wirfs-brock.com>wrote:

>
> On Apr 21, 2013, at 3:27 PM, Mark S. Miller wrote:
>
> > Warning: The following is a sickening idea. I would really hate to see
> us do it. But I feel obliged to post it as it may in fact be the right
> thing to do.
> >
> >
> >
> > Given: Web reality drives us towards recognizing {...., __proto__: ....,
> ....} as special syntax for initializing [[Prototype]].
> >
> > Given: JSON demands that the "__proto__" in JSON.parse('{....,
> "__proto__": ...., ....}') not be treated as a special case, and causes
> just the normal [[DefineOwnProperty]].
> >
> > Given: Web reality does not make demands on the meaning of {....,
> "__proto__": ...., ....}
> >
> > Given: The ES5 JSON spec demands that JSON.parse('{...., __proto__:
> ...., ....}') be rejected as an error.
> >
> >
> >
> > This suggests that, in JS as well, the "__proto__" in {....,
> "__proto__": ...., ....} not be treated as a special case. Quoting it turns
> off the special treatment.
> > \
>
> I've seriously considered proposing this.  It slightly complicates the
> specification but all-in-all I think it might be a good idea.
>

I fear you may be right. But I don't have to like it ;)



>
> Allen
>
>


-- 
    Cheers,
    --MarkM
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130421/f52e1b2c/attachment.html>


More information about the es-discuss mailing list