by Illniyar · 10y ago · 0 comments
Makes it very simple to use it anywhere you'd use a plain array or object, rather then always having to use immutable.js's api.
I.E. if I have {a:{aa:"1"},b:"cc"} and I change b, then {aa:"1"} will not be deep copied.
Are you talking about something like keeping a reference to the parent and sending lookups up the chain (with a prototype or some such?)
a \
c-d-e
b /
The memory for the original list is still shared!
You can generalize that to trees and use that to implement, say, persistent hashmaps that can share data.This is also awesome for parallelization where you want to share data but don't need synchronization!