Skip to content
0:00 / 0:00

#clojure#persistentdatastructures#immutability

Persistent Data Structures and Managed References - Rich Hickey

Zhang Jian

976 subscribers • 3 videos on Hallway

YouTube
  • Recommended by 2 people: 2 in engineering communities.
  • Presented by Rich Hickey, creator of Clojure
  • An opinion. It argues one side of a question engineers disagree on.

Intermediate. Assumes working knowledge.

10K views7 years ago2 recommendations

Computer scienceProgramming languagesData structuresLisp and ClojureConcurrency and parallelism

Rich Hickey explains the difference between values and references, and how Clojure uses persistent data structures and managed references.

from infoq

Why it's here

2 people recommend this

What people say. Engineers recommend this talk for its clear explanation of immutability, structural sharing, and the difference between values and references.

Moments people linked to

u/mjohndoin r/functionalprogramming • Recommends

On “Functional programming beginner questions!”

These are great questions, honestly. I'll go one by one. 1. You would think so, right? This is one of the difficulties with using a functional style in a language without first-class immutable data structures, you end up doing things like "defensive copying", which is very bad indeed! Luckily, there are really cool immutable data types that rely on structural sharing as opposed to making copies on each write. Check out the five minutes [after this marker in this "Persistent Data Structures and Managed References" video], which gives a great explanation of how this works. **TLDR;** With clever design, an immutable hash map can give you O(log32n), which is worse than O(1), but still pret…
3View on Reddit

u/petemakin r/Clojure • Recommends

On “If Clojure is immutable, how does atom work?”

This is very imprecise and misleading. There is a difference between references and values. You can change the reference but the values does not change unless you uses a managed transaction. Rich Hickey explains that so well: link to this video