Why is useful to have a atom type (like in elixir, erlang)?

后端 未结 3 1597
被撕碎了的回忆
被撕碎了的回忆 2020-12-30 00:31

According to http://elixir-lang.org/getting-started/basic-types.html#atoms:

Atoms are constants where their name is their own value. Some other lang

3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-30 00:40

    Atoms are constants with itself as value. This is a concept very usefull in distributed systems, where constants can be defined differently on each system, while atoms are self-containing with no need for definement.

提交回复
热议问题