Why did the elixir change the designation for sending a message to the process?

I noticed that in elixir version 0.10.1 you send a message to a process like this

 my_process <- :message, self

But now in elixir 1.0.2 you send a message to a process like this

 Process.send my_process, :message, self

What is the reason for this change?

+4
source share
1 answer

Prior to this change, the lists of concepts were as follows:

lc x inlist my_list do
  # ...
end

However, the syntax was strange for beginners, and so the Elixir team tried to find an alternative. Win syntax was

for x <- my_list do
  # ...
end

Now the value has <-suddenly become context dependent. This is usually bad, but often more difficult to understand and allow for ambiguity, so they decided to change it.

send <- receive. , , .

, Process.send/3 . :noconnect :nosuspend. send (aka Kernel.send).

+8

All Articles