4 ms·
What's your impression of Elixir coming from Clojure, other than that? I wanted to get into Clojure but I really wanted a language that almost entirely forced
by lectrick 11y ago
What's your impression of Elixir coming from Clojure, other than that?
I wanted to get into Clojure but I really wanted a language that almost entirely forced me to forego mutability (due to the large class of bugs I've seen in the past because of it) and Elixir seemed to provide that, Clojure did not, it was more live-and-let-mutability-live... and I didn't like that.
Regarding your question, it's my understanding that (again, due to everything being immutable), larger data sent between nodes in the same BEAM VM is not copied, it is reference-counted and garbage-collected and any changes are copy-on-write but only for that part of the data structure (due to implementation of Persistent Data Structures underneath).
One thing I'm VERY curious about with regards to Clojure is Datomic. Elixir (IMHO) could really use a fully queryable, immutable DB. After I drank the immutable kool-aid, it was jarring to have to think about mutation in global state again whenever I touch a database, to the point that I'm considering foregoing SQL as long as possible and just dealing with Mnesia or Basho's Riak and writing implementation-agnostic wrappers around my datastores (the latter is probably a good idea anyway).
Mutexes need to die in a fire. ;)