[erlang-questions] make_ref bug or feature?
Fri Mar 27 13:21:05 CET 2009
Joe Armstrong wrote:
> If I start two erlang shells and evaluate the following in both shells:
> 1> io:format("~p~n",[term_to_binary(make_ref())]).
> They *both* print the same thing - this violates the principle of
> least astonishment.
> (I thought I'd have to start 2^82 shells :-)
> Is this a bug or a feature?
You didn't start two different distributed nodes, just two VM:s in
non-distributed mode. The node name is included in the representation,
which you can see if you extract a part of the byte sequence above:
So you got the same name (and everything else the same too) in
both VM:s, i.e., the default name.
More information about the erlang-questions