Andreas Rossberg wrote:
This brings me around to the position that let-like global instantiation should 
reject let-shadowing  of non-configurable property global properties such as 
‘undefined’ and ‘window’.

All good points, I agree.

Agreed.

>  The VarNames list is actually support a different case.  The general case is 
that we down’t allow the same name to be explicitly declared using both a ‘var’ 
and a ‘let’ (etc.) declaration in any scope, including the global scope.  However, 
we only apply that rule to explicit global var/function declarations. Undeclared 
global properties are “in the global scope” but are not considered to be var 
declarations.

OTOH, var declarations usually result in non-configurable properties
anyway, so would already be covered by the above, once we have it. The
only exception are var declarations from sloppy eval, but I suppose
one could make an argument that it is fine to be able to shadow those.

Right, if there's any sense in that old sloppy-eval-makes-configurable-var from ES1, the sense extends to this corner case.

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

Reply via email to