This is output of erlang shell:
1> atom.
atom
2> next_atom.
next_atom
3> atom@erlang.
atom@erlang
4> 'atom in single quotes'.
'atom in single quotes'
5> atom = 'atom'.
atom
6> a.tom.
'a.tom'
7> a..tom.
* 1: syntax error before: '..'
When there is just one dot . within atom (line 6), I get no errors. However, when there is .., I get syntax error. Does .. have some special meaning in Erlang or why do I get error when . works fine?
Dots are not allowed as such in atoms, but a dot between two atoms:
'foo'.'bar',is a compile time operator that concatenates the atoms to
'foo.bar'.This is an extension which was made to support the (still not officially
supported) Java-like package system. That’s why it’s not documented.