Immutable data structures for functional JS
summary
Argues that persistent immutable structures replace costly full-copy updates with bitmap vector trie style trees that share nodes so updates copy only the root-to-leaf path, giving logarithmic costs that are effectively constant (log base 32 ≈ 6–7 for billions of items). Shows integer-index and hashed-key variants like the hash array mapped trie, and demos JS libraries: immutable-js (Facebook/React ecosystem) and Mori (Clojure port), notes tradeoffs in API style, size and maintenance.
AI-written summary · about
chapters (9)
- 0:00Introduction
- 2:33Functional programming
- 4:32Immutability rocks
- 5:35Zoo
- 7:34Mutation
- 10:39Persistent data structures
- 12:20Trees and sharing
- 20:41bitmap vector try
- 28:48libraries
related talks
27mImmutable data structures for functional JS
45mJavaScript Immutability - "Don't Go Changing"
26mImmutability, interactivity & JavaScript
31mImmutable Data and React
19mImmutability is Changing: From Immutable.js to Immer
34mFunctional Programming in JavaScript
01h 03mFunctional Programming in JS: What? Why? How?
53mMaintainable JavaScript with Functional Patterns
