3 ms·
> which greatly limits their effective usefulness. Interesting Why? And what’s the alternative implementation?
by nuclearnice1 5y ago
> which greatly limits their effective usefulness.
Interesting
Why?
And what’s the alternative implementation?
- masklinn 5y agoPersistent collections with structural sharing (b-trees, HAMT, RRB-vectors, …). I can absolutely understand not using them if the implementation is intended to be simple or the systems it's running on is resource limited, but simply removing the mutation bits of mutable collections is quite limiting as it incurs large overhead when actually working with them (you have to copy the entire thing every time you want to update anything). Unless the collections are always kept quite small: modern architectures are very good at dense arrays, so modern immutable data structures are trees of small-ish arrays (usually a small number of dozens, IIRC Clojure uses 32-wide nodes).
- nuclearnice1 5y agoI learned a lot. Thank you