As web developers, one thing that we don’t have to worry about is concurrency. We don’t have threads, we don’t care about multiple cores etc.
I came across a fascinating talk from the creator of the Clojure language, Rich Hickey, which is called Persistent Data Structures and Managed References.
In the first part of the talk, he defines and clarifies the concept of state, by first defining the concepts of identity and value.
Then he goes on to describe how Clojure represents composite objects such as hash maps and how it’s able to keep them immutable in an efficient manner, by using persistent data structures.
It’s well worth the watch, even if you might not end up ever writing a single line of code in Clojure.