1.) Elixir uses persistent data structures.
- Topic: How Elixir Manages Memory?
- Sets in Elixir - an old blog post discussing the now deprecated HashDict and HashSet (now use Map and MapSet instead) in terms of persistent data structures.
2.) Personally I avoid talking about variables in Elixir altogether (I refer to them as names - I also avoid talking about statements as Elixir uses expressions; there is no return
keyword for functions because expressions always have to evaluate to a value).