4 ms·
No, Erlang can only send messages between it's processes. Java can share.
by gleenn 8y ago
No, Erlang can only send messages between it's processes. Java can share.
- SEMW 8y agoTo 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.