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. So, reverting the question, what is **your** point saying that __proto__ is better than Object.setPrototypeOf ? Regards On Wed, Mar 20, 2013 at 12:22 PM, David Bruant <[email protected]> wrote: > Le 20/03/2013 19:04, Andrea Giammarchi a écrit : > > I don't understand where is the problem ... any library that uses > __proto__ can and should be updated with a shim waiting for next version of > JS to support it. > > Which library? What are the inconsistencies between the current __proto__ > draft spec and how libraries use __proto__ today? Please be very specific; > that's quite relevant when doing a de facto standard so it's important to > know. > > > Object.setPrototypeOf = function (object, proto) { > object.__proto__ = proto; > return object; > }; > > That does not look bad at all to me, educate developers out there that > __proto__ is harmful and forbidden 'cause saying "we can't do much is > already used" doesn't mean is OK to use it, same as polluting > Object.prototype, still possible, nobody does it (not in an old fashioned > way at least) > > What's your point here? > I don't understand why Object.setPrototypeOf should be added or shimmed if > the best practice is to avoid using __proto__. > > David >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

