10 ms·
To clarify that a bit -- while the semantics are that erlang can only send messages between processes, what the BEAM actually does under the hood can certainly
by SEMW 8y ago
To clarify that a bit -- while the semantics are that erlang can only send messages between processes, what the BEAM actually does under the hood can certainly involve memory sharing, for efficiency reasons. E.g. binaries >64 bytes are stored outside of the individual process heaps, and are just sent as references rather than actually copied (unless sent to a proc on another node in a mesh, of course).
Since everything's immutable, from the programmer's point of view the behaviour is identical to if it was copied, so the sharing is an implementation detail that doesn't affect the semantics.