immutable-objects-facilitate-fast-reference-comparison

talk-hot-reloading-with-time-travel#immutable-objects-facilitate-fast-reference-comparison

At 14:00 - Whatever calls the "handle" function can call the canonical getState before and after the function and if the reference has changed (because it's immutable), then the state has changed. No need for emitting a state change event. (Gordon note: this could allow for objects to reconcile on their own, with control-loops where they decide on their desired change based on the fact that there is a change, and what the change between the previous and current versions of the data are.)

 

This is one of the performance benefits of Om, as well. It can very quickly see whether an entire object with deeply nested values, has changed.