Any reason why __proto__ is not a well known symbol?
allen at wirfs-brock.com
Tue Feb 16 19:21:35 UTC 2016
> On Feb 16, 2016, at 8:00 AM, Dean Landolt <dean at deanlandolt.com <mailto:dean at deanlandolt.com>> wrote:
> s it too late to remove support for dunder-proto strictly within module contexts? This might introduce a bit of a refactor hazard when pulling old code into modules, but it's only the static `obj.__proto__` usage that has any effect so this can be handled pretty easily with linter warnings. Or it could be contextually reserved and throw an early exception.
dunder proto as built-in property of Object.prototype is mode/syntactic context independent. It can be restricted in that manner.
On the other hand, the meaning of dunder-proto within an object literal is specified  as a syntactic form. So, in theory, its use could be restricted to specific syntactic contexts such as strict mode or not in a Module. ES2015 did not apply any such restrictions and given that strict mode and dunder-proto has co-existed in browsers since ES5 it’s unlike the we could purge it from strict mode. Making it illegal in Modules might still be feasible. It would probably take some some strong advocation within TC39 to make it happen.
 http://tc39.github.io/ecma262/#sec-__proto__-property-names-in-object-initializers <http://tc39.github.io/ecma262/#sec-__proto__-property-names-in-object-initializers>
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss