Atoms Mapping

Atom is a constant with name, which is also known as Symbol in other languages, such as Ruby.

Atoms in Hamler are imported from Erlang, defined as a primitive type, but have a different syntax from Erlang.

Atoms in Hamler start with a colon :

  1. :ok
  2. :error
  3. :the_1st_Atom
  4. atom("node@127.0.0.1")

Atoms in Erlang:

  1. ok
  2. error
  3. the_1st_Atom
  4. 'node@127.0.0.1'