If you are willing to get over it, you'll find that huge classes of errors disappear. It's a very nice feature that lets you cut a bunch of bs, clarify your code, and make everything much more comprehensible. When you can mutate your values, you have to read any given block of code with a ton of suspicion (and possibly trace through control flow, keeping branches in your head, god I don't miss doing that). If your values are immutable, you don't have to do that.
The one place where it screws you over in erlang is the REPL, which I think is why Elixir chose to allow you to mutate the variable binding, (but the underlying values are still immutable). In my main code, I mark any variables that I will mutate binding (almost never) with a ! postfix sigil (idea stolen from Julia/Ruby)
The one place where it screws you over in erlang is the REPL, which I think is why Elixir chose to allow you to mutate the variable binding, (but the underlying values are still immutable). In my main code, I mark any variables that I will mutate binding (almost never) with a ! postfix sigil (idea stolen from Julia/Ruby)