> On Feb 16, 2016, at 8:00 AM, Dean Landolt <[email protected] 
> <mailto:[email protected]>> 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 [1] 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. 

Allen

[1] 
http://tc39.github.io/ecma262/#sec-__proto__-property-names-in-object-initializers
 
<http://tc39.github.io/ecma262/#sec-__proto__-property-names-in-object-initializers>
 

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to