~/talk

JavaScript Immutability - "Don't Go Changing"

Talkat Jfokus 2016 · 2016-02-08..02-10· [javascript]
slides:none on file

Compares plain ES6 copying versus libraries and recommends Immutable.js (Facebook) which implements persistent data structures (HAMT / index trees) to create efficient new versions that share memory. Shows concrete API: create with fromJS, read with get/getIn, change with set/update, bulk-change with withMutations, convert back with toJS; lists behave like immutable arrays and sequences support lazy ranges. Reports small CPU and memory overhead versus big gains in fast reference equality checks, easier undo stacks, and safe caching.

AI-written summary · about

  1. 0:00Introduction
  2. 1:26What is immutability
  3. 2:28Persistent data structures
  4. 4:55Directed acyclic graphs
  5. 5:16Index trees for arrays
  6. 9:07Hash array mapped trees
  7. 13:21Benefits of immutability
  8. 16:08Drawbacks in JavaScript
  9. 17:10Options for immutability
  10. 21:26Manual immutability with ES6
  11. 23:51Immutable.js library
  12. 27:42Working with Immutable.js maps
  13. 33:20Batch changes with withMutations
  14. 34:24Immutable.js lists
  15. 38:17Sequences and infinite collections
  16. 41:47Summary
  17. 43:11Q&A
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.