I'm a Systems Reliability and DevOps engineer for Netdata Inc. When not working, I enjoy studying linguistics and history, playing video games, and cooking all kinds of international cuisine.
The biggest benefit, IMO, is not something that can be achieved unless it's baked in at the language level.
Put simply, immutable data done right is potentially very efficient.
The BEAM runtime environment (used by Erlang, Elixir, and a few other languages) demonstrates this nicely. Because all data in BEAM is immutable (and they use reference counted garbage collection):
Sharing data between processes is trivially safe (in that the data won't just vanish or change while you're accessing it).
Local messaging is wicked fast. Sending a message between two processes on the same node just creates a new reference to the message data, so it's almost instant.
Many sequence operations are insanely fast, because the new sequence they generate references the old one wherever possible. Concatenation of sequences, manipulation of the first element in a list, etc.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The biggest benefit, IMO, is not something that can be achieved unless it's baked in at the language level.
Put simply, immutable data done right is potentially very efficient.
The BEAM runtime environment (used by Erlang, Elixir, and a few other languages) demonstrates this nicely. Because all data in BEAM is immutable (and they use reference counted garbage collection):