Hacker News new | ask | show | jobs
by lilactown 3313 days ago
Erlang/Elixir also is immutable & persistent by default.
1 comments

It is immutable and persistent, but not with the same performance characteristics. It lacks Bagwell's data structures that allow structural sharing. Take a 10 million item list in elixir and 'change' (return a new) the 5 millionth element. Time how long it takes. Do the same with clojure. Compare.
That was true a few years ago, but not anymore: https://medium.com/@jlouis666/breaking-erlang-maps-1-31952b8...

(You would have to use a map though, the native lists are still plain old lists)