4 ms·
You often lose performance in traditional imperative languages when aiming for persistence. When you have immutability guarantees (like in many functional prog
by sgeisenh 5y ago
You often lose performance in traditional imperative languages when aiming for persistence.
When you have immutability guarantees (like in many functional programming languages like ML or Haskell) you can avoid making copies by sharing the parts of the data structure that don't change.
If this kind of thing interests you, you should check out Chris Okasaki's book "Purely Functional Data Structures".
- eximius 5y ago"avoid making copies" dors not always equal "performance". Depending on your access patterns, having the data colocated can be more important. But immutability sure is nice when you can have it.