Mutable Proto

Rick Waldron waldron.rick at gmail.com
Wed Mar 20 13:33:53 PDT 2013


On Wed, Mar 20, 2013 at 3:40 PM, Andrea Giammarchi <
andrea.giammarchi at gmail.com> wrote:

> I think zepto is using that to modify runtime NodeList results after
> querySelectorAll but in any case it was not me saying that __proto__ is
> used already. I use it only to shim getPrototypeOf to be honest and I don't
> think is a good idea to use it at all.
>
> My point is that Object.setPrototypeOf does not need a property loads of
> shenanigans as __proto__ is so that no Object.prototype.__proto__ would
> ever exist anywhere.
>
> I don't even know why that existed in first place,to be honest ... so do
> not use it, pass through Object.setPrototypeOf, same as you would suggest
> pass through Object.defineProperty instead of using
> Object.prototype.__defineGetter__ __defineSetters__, both "de facto
> standards" some time ago.
>

IE never implemented the __defineGetter__ __defineSetter__ but they did
implement the ES5 Object meta APIs and _are_ implementing __proto__ for
parity with browsers that currently support it—this is the big difference.
This is in addition to the rationale recorded here
https://github.com/rwldrn/tc39-notes/blob/master/es6/2013-01/jan-29.md#45-why-standardizing-on-__proto__-and-not-__definegsetter__-__lookupgsetter__

Rick



>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20130320/4c3cd3e2/attachment.html>


More information about the es-discuss mailing list