ES4 note: Reserved namespaces
waldemar at google.com
Mon Apr 28 17:39:11 PDT 2008
I agree with everything except:
* reserved namespaces may not be aliased (ie they are illegal
on the right hand side of "=" in "namespace ns1 = ns2")
If we want to make reserved namespaces into keywords, that might be ok. However, at the current time they're not keywords, and one could write:
const foo = intrinsic;
namespace instrinsic = my_namespace;
Being able to write those but not:
namespace foo = intrinsic;
is just splitting hairs without achieving anything important. You still shouldn't be able to define properties in the reserved namespaces except as outlined in the proposal.
One can also write:
var intrinsic = 3;
which (I hope) would shadow the intrinsic namespace within its hoisted scope.
More information about the Es4-discuss