Remix.run Logo
nine_k 17 hours ago

Why, no, deletion is possible in immutable structures, as long as nothing else references the deleted nodes. This is literally how lists / trees / any complex structures work in Haskell (and apparently in Clojure): a mutation gives you a new immutable structure, but the old immutable structure (or parts thereof) can be forgotten and disposed of.

layer8 17 hours ago | parent [-]

It’s very common, however, that data will reference the data to be deleted, or be derived from it in a way that will become invalid when it’s deleted. Parallel processing becomes less straightforward because you have to make sure that all parallel processes see a consistent state of the deletion. Depending on the nature of the data to be deleted, you may actually have potential mutation, if there are keys that are sensitive data.