News for hackers. Stuff that matters.
Re:Why Does “=” Mean Assignment? by aprao on Tuesday April 10, 2018 @05:16PM (#16805520)
Elixir has borrowed the pattern matching approach from Erlang, but allows rebinds which makes code refactoring easier.

iex(1)> x = 1 1 iex(2)> x = 2 2 iex(3)> ^x = 3 (MatchError) no match of right hand side value: 3

Notice the pin operator (^) to achieve the same effect.

Re:Why Does “=” Mean Assignment? by dxhdr on Tuesday April 10, 2018 @05:27PM (#16805624)
I've used Erlang but not Elixir. Having an additional optional "pin" operator sounds like a bad idea, just piling on complexity. You can't mess up with the Erlang syntax.
Re:Why Does “=” Mean Assignment? by glorioustao on Tuesday April 10, 2018 @07:21PM (#16806581)
The creator of elixir had a blog on this: http://blog.plataformatec.com.br/2016/01/comparing-elixir-an...
Re:Why Does “=” Mean Assignment? by gcb0 on Wednesday April 11, 2018 @05:16AM (#16809333)
only the case argument there is any good. when it get to numbered vars, you know they are grasping for anything