Object.prototype.* writable?

Breton Slivka zen at zenpsycho.com
Sat May 7 18:26:30 PDT 2011

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.

More information about the es-discuss mailing list