3 ms·
I don't like the operators' logic in elixir. There should be one for assigning variables, one for pattern matching and there is no rebinding of variables. Coul
by claudiojulio 5y ago
I don't like the operators' logic in elixir. There should be one for assigning variables, one for pattern matching and there is no rebinding of variables.
Could be like that:
// assigning
x = 1
// pattern matching
x ^ 1
// pattern matching and assigning
x =^ 1
And they should remove the rebinding that is useless. But I find it very difficult for that to happen at that time.
Automatically translated.
- lessthanseventy 5y agohttps://elixir-lang.org/getting-started/pattern-matching.html#the-pin-operator https://elixir-lang.org/getting-started/pattern-matching.htm...
- dmitriid 5y agoHaving had experience with Erlang, I still find it weird that you can update variables :)
- deleted 5y ago[deleted]