On Installation
- It is much easier to install Erlang and Elixir via Homebrew, if you are using Mac, you definitely should consider this route
brew install elixir
brew install erlang
On Syntax
trueand:trueare the same, same goes tofalseand:false. These have data type ofbooleans- Constants, or symbols are called atoms. For example
:hellois an atom. - The atom version of booleans (i.e.
:trueand:false) are special cases, and will be treated as booleans. As can be shown below by the interactive output of Elixir. Note :hello is an atom, but not a boolean
iex(7)> is_boolean :true
true
iex(8)> is_boolean :false
true
iex(9)> is_atom :true
true
iex(10)> is_atom :false
trueiex(11)> is_boolean :hello
false
iex(12)> is_atom :hello