[erlang-questions] Introspecting the atom table

Yariv Sadan yarivvv@REDACTED
Thu Dec 21 01:41:27 CET 2006


Do repeated calls to list_to_atom(Str) with the same Str value
actually create new atoms, or does list_to_atom() check if the atom
already exists? (I thought it was the latter)

Yariv

>  My understanding is that "an atom is forever".  In long running
>  code I don't want to keep creating new atoms if I already have
>  one.  The above I use where I have sporadic communication between
>  remote servers that could come online or offline.
>
>  This was one example where I might not want to keep creating new
>  atoms so use the try/catch idiom.
>
> ~M
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://www.erlang.org/mailman/listinfo/erlang-questions
>



More information about the erlang-questions mailing list