[erlang-questions] Why is there an atom table?
Sat Jul 20 16:12:41 CEST 2013
So, atoms are stored in a shared table, using locks to read & write, and
Well we know the issues that emerge from this.
What I can't find on the Web is the purpose of this table.
Why does Erlang needs to assign a unique hash to a <255-characters string
and put it in memory?
I thought atoms were just like enums, thus the only actions needed on them
were ==, =:= and the various conversions to string or binary.
An atom (approximately) corresponds to this regexp:
Its syntactic representation **already** supports the actions I cited.
Why not get rid of the atom table and and just use strncmp(3)?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions