State, Immutability, and Persistent Data Structures
Have you herd any of these phrases before?
"Try it again"
"Try refreshing the page"
"Restart the server"
"Reinstall the program"
"Reinstall the operating system and then the program"
"Hmm, it must have been a fluke"
We'll talk about what you've witnessed when you hear these phrases and how immutability and persistent data structures can help. Along the way we'll learn the difference between values and identities, look at what it's like to program with persistent data structures, why we might want to do that, and discuss a little philosophy. We'll use Clojure for some examples (no previous experience necessary), but these concepts apply to any language: