Le 20/03/2013 16:15, Brendan Eich a écrit :
To recap,
1. __proto__ is out in the field, a de-facto standard on "mobile", and
not going away. Adding another API doesn't help, it hurts.
2. SES and other secure subsets want same-frame (global object,
"realm") mashups of code that may use __proto__ and code that must
not, but Object.setPrototypeOf is a per-frame capability that would
have to be removed, breaking the former class of code.
(...)
Yes, the problems you cite are real, but they are already part of the
de-facto __proto__ standard (1).
Agreed.
From the spec/implementor point of view, __proto__ has to be added as
de-facto standard because it is used.
From the developer point of view, it is not because it's in the
language that it's a good idea to use it. Quite the opposite, I'd like
to reiterate that devs should make "delete Object.prototype.__proto__"
the second line of their code (first line is "use strict";).
Devs shouldn't make the mistake to think that __proto__ in the standard
makes it a good or legitimate feature.
__proto__ in ES6 is yet another ECMAScript Regret [1]
David
[1] https://github.com/DavidBruant/ECMAScript-regrets (I haven't found
much time to write more, but issues are more interesting to read than
just the part that's been written down)
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss