whoah! I didn't know that. Why doesn't that work with:

 function o () {}; o.prototype=null; new o();

?


As for the current discussion, I should think that some way to
instantiate a new "clean" global object, and inject it into the
current scope would be somewhat more useful, as it would enable newly
written scripts to depend on the assumption that those global
constructors are a particular shape, and leave old scripts which
depend on the mutable behavior alone. It would even enable new scripts
to depend on mutable "global" constructors- Their own mutated copies
that is. I vaguely remember some proposal along these lines. And some
libraries make their own copies of the globals to mutate.
_______________________________________________
es-discuss mailing list
es-discuss@mozilla.org
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to