Loyal Opposition to Const, Private, Freeze, Non-Configurable, Non-Writable...

Mikeal Rogers mikeal.rogers at gmail.com
Wed Nov 2 09:51:14 PDT 2011

On Nov 2, 2011, at November 2, 20119:30 AM, Quildreen Motta wrote:
>> "freeze" does not add anything new to an object. If you don't want to change the shape of an object ... don't change the shape of the object.
> Again, immutability isn't just about security, but optimisation as well. You could also look at shared-memory threads, because I think they make a hell of an argument for "frozen" objects or immutability.

The last time we looked at freezing a few core objects in node.js we found that v8 was actually slower with them frozen and backed them out, which is probably a good thing.

I'm very skeptical of the "new language feature for optimization" argument ever since the static typing debate in ES4 and the tracer work Mozilla did shortly after.

More information about the es-discuss mailing list