[erlang-bugs] node type in documentation or API?

Raimo Niskanen <>
Mon Jul 6 12:02:34 CEST 2009

On Thu, Jul 02, 2009 at 05:16:51PM -0700, Michael Truog wrote:
> The documentation is a little ambiguous when it mentions the node type
> since it uses "node()" instead of "atom()", and this may be on purpose. 
> If this is on purpose it would be really nice to have a function
> "erlang:is_node(Node)" for guard tests.  Otherwise, if I put
> "erlang:is_atom(Node)" in the guard tests, I am making the assumption
> that node types are always atoms.  I don't know if that is always
> suppose to be the case since the documentation uses a separate type.
> Thanks,
> Michael Truog

That is a beautiful thought, but very hard to do.

The documentation uses node() for clairty.

We could introduce is_node/1, but making a node a separate
type in the emulator would break lots of existing code.
So we would have to warn several release before, and those
customers that have large (millions of lines of code)
applications in maintenance would most probably refuse
such an update, forcing us into two release tracks
for the lifetime of their products.

The semantics of is_node/1 must also be decided.
Will it return true for existing nodes, existing
and old nodes, or existing and old and possible
future nodes.

It is very unlikely this will ever happen.

> ________________________________________________________________
> erlang-bugs mailing list. See http://www.erlang.org/faq.html
> erlang-bugs (at) erlang.org


/ Raimo Niskanen, Erlang/OTP, Ericsson AB

More information about the erlang-bugs mailing list