React.js Conf 2015 - Immutable Data and React
Why Hacker News recommends it
HN points to it as a clear explanation of immutable data structures such as tries, and of the case for immutability with React and Flux.
What it is
Lee Byron of Facebook explains how persistent immutable data structures work and how to use them in React apps with Immutable.js. He covers memoization benefits and avoiding coupling through shared mutable state.
Recommended by 5 HN commenters across 5 different months, 2015 to 2022.
What Hacker News said
Recommends netgusto · 2015-03 · on “Hamsa – A simple data-binding and observable model”
IMHO, one-way data flow + immutability competes with (beats ?) observed mutations in many use cases. See [this video] , and more specifically [this video]
Recommends victorcase · 2016-11 · on “Immutable.js: An Introduction with examples written for humans”
@diegorbaquero you should watch that [this video] . The author spoke about performance and immutability-data structures like Directional Acyclic Graphs and Trie.
Recommends clay_to_n · 2017-05 · on “Build Yourself a Redux”
For anyone interested, there's a great conference talk on this topic by Lee Byron from Facebook: [this video]
Recommends icc97 · 2017-12 · on “Git is a purely functional data structure (2013)”
I found the explanation from the Immutable JS presentation easier to understand when talking about Immutable data structures [0] [0]: [this video]
Recommends jamesgpearce · 2022-06 · on “Ask HN: Best dev tool pitches of all time?”
Lee Byron on Immutable/React/Flux: [this video] “I only have a minute left, which is more than enough time to build the undo stack”
Cites icc97 · 2017-03 · on “Modern JavaScript for Ancient Web Developers”
I attacked the modern Javascript approach through first focusing on functional programming. 1. Python + functional programming in Python Python is hardly a pure functional language, but it's lovely and simple and has all the core concepts including list comprehensions. This leads you on to... 2. Haskell If you want to find a pure functional solution to a Python problem, first search for the Haskell one and translate it. Then read Learn You a Haskell [0] which was the funniest programming book I ever read and almost, almost taught me about monads (I had it for a second, then tried to explain it in Python and all was lost) Now you can relax cause the hard bit is done. 3. Read Javascript the Go
Cites fyp · 2020-01 · on “Reasons to Learn Redux as a JavaScript Developer”
Most functional languages have immutable persistent data structures that don't require a linear copy and are fairly efficient. For example in clojure, sequences are implemented as 32-ary tries so insert/delete/update to any particular index will only cost around sizeOfNode * numParents=32 * log_32(n). This comes with a cost that indexing is now log_32(n) but it's usually a fair price to pay. In javascript, immutable.js implement these same ideas (as least according to these talks where they talk about index tries and hash array mapped tries: [this video] ) If you want native support, javascript engines are actually free to swap out their implementation of arrays! I know they already do depending