> OTOH we don't need to standardize __proto__. We might instead poison-pill it > in Harmony, so opting in involves an early error on every use of __proto__, > and you have to migrate by switching to Object.getPrototypeOf or an object > initialiser extension that allows presetting the new object's prototype chain > link.
I know you aren't recommending this, but I just want to add more reasons why it's a bad idea. It would preserve the specialness of "__proto__" when the hope is that we could eventually get to a point where it's not special anymore; that's the point of Object.getPrototypeOf being a static method. Forcing every object to have special magic properties breaks abstractions and breaks use cases like object-as-table. And an early error just means people would hack around it by using obj["__proto__"] or obj[(function(){return "__proto__"})()] or whatever they needed to circumvent the static analysis -- assuming we don't solve the halting problem in the meantime, of course. ;) > My argument leaves us with __proto__ as non-standard extension, to wean > people off of if we can, via docs and evangelism. This seems a better course > to me than premature (anti-)standardization. Agreed, 100%. Dave _______________________________________________ es-discuss mailing list es-discuss@mozilla.org https://mail.mozilla.org/listinfo/es-discuss