|
|
|
|
|
by Sonata
4239 days ago
|
|
Haskell and Clojure both use structure-sharing data structures, which allow immutability without the cost of copying the entire structure whenever you want to make an update. They also use laziness to improve the performance of their data structures. If you want an implementation of these ideas in JS, Immutable.js [0] or Mori [1] are the leading libraries. seamless-immutable doesn't use these techniques, so it probably wouldn't perform well on large data sets. The benefit of it is that the immutable objects can be used as drop-in replacements for their native JS equivalents in some situations. Full disclosure: I've contributed to Immutable.js [0] https://github.com/facebook/immutable-js [1] https://github.com/swannodette/mori |
|