Dean Landolt dean at
Mon Sep 24 07:57:11 PDT 2012

On Mon, Sep 24, 2012 at 10:44 AM, David Bruant <bruant.d at> wrote:

>  Le 24/09/2012 16:39, Dean Landolt a écrit :
> s/shared state/shared *mutable* state/
> True, I took it as granted, since objects are by default (very) mutable in
> JavaScript.

Not necessarily, and they certainly don't have to be. To reiterate:
immutable doesn't mean they have no update operations, just that these
operations don't update-in-place. It's the difference between
Array.prototype.concat and Array.prototype.push. With vm support this could
be done cheaply. Code would be easier to reason about. There are some other
subtle wins like being able to keep aggregate calculations in the tree
branches (like how CouchDB stores its reduce calcs, but more generalizable,
see [1]). Oh, and you'd be able to pass these objects freely between worker

There's plenty of room in the language for persistent immutable collections.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the es-discuss mailing list