You have to know about persistent data structures (August Lilleaas' blog)
The first thing I look for when checking out a new programming language is immutable persistent data structures. This is an injury I've gotten from Clojure, which has them out of the box. I tend to structure my whole app around these kinds of data structures. They are smart, fast, efficient, immutable and amazing. In this post, I'll try to make you feel the same way about them. I'm not going to try to sell this one. Because it's a tough sell. As in, I know a few people that don't like immutable values, and I have no idea how to sell it to them. Personally, I like to use something that fundamentally eliminates a whole category of bugs from my code. Sorry. Couldn't resist being snarky. I don't want to trash talk those who don't like immutability. But I just don't get it. Let's say you have an immutable hash map or something. It's implemented using some kind of tree structure under the hood, like a lot of data structures are. The problem happens when we want to add a key to this map. The
The first thing I look for when checking out a new programming language is immutable persistent data structures. This is an injury I've gotten from Clojure, which has them out of the box. I tend to structure my whole app around these kinds of data structures. They are smart, fast, efficient, immutable and amazing. In this post, I'll try to make you feel the same way about them. Axiom: immutability is good I'm not going to try to sell this one. Because it's a tough sell. As in, I know a few people that don't like immutable values, and I have no idea how to sell it to them. Personally, I like to
related reading
- Everything I know about good system designseangoedecke.com
- Build Your Own Databasenan.fyi
- Bringing Clojure programming to Enterpriseblogit.michelin.io
- Variables and Mutability - The Rust Programming Languagedoc.rust-lang.org
- A half-hour to learn Rustfasterthanli.me
- how I think when I think about programming - alice mazalicemaz.com
- Destroy All Values: Designing Deinitialization in Programming Languages - Faultloregankra.github.io
- A data race that doesn't compilecorentin-core.github.io
- Building a BFT JSON CRDTjzhao.xyz
- CRDT optimizationsbartoszsypytkowski.com
- Val on Programming: What makes a good REPL?vvvvalvalval.github.io
- Reading 8: Mutability & Immutabilityweb.mit.edu