Coming from Erlang I’m used to variables being imutable, Elixir doesn’t provide this same level of comfort that I am used to. For instance, when learning Erlang we are taught that once a variable is bound it cannot be changed.
|
In Elixir the story is not quite the same…
|
Normally this probably isn’t a big deal, I guess, maybe… but it really starts to suck is when you were hoping to get that sweet, sweet patern matching. To force the variable in Elixir to not pick up a new value you have to put a caret in front of the variable.
|
I’m not sure of what would be a better solution; however, I am not a fan of this in the language.