On Mon, Sep 24, 2012 at 10:44 AM, David Bruant <[email protected]> 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
boundaries.

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

[1] http://en.wikipedia.org/wiki/Finger_tree
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to