Since Elixir is a functional programming language, it does not have objects. The language also has a strong focus on immutability. In Elixir we transform data rather than mutate it.
Said another way: OO changes. FP copies.
While this difference may be subtle and might even seem inefficient, it’s transformational. Many of Elixir’s most important benefits flow directly from this design decision. In this section, we’re going to look at what those benefits might be, and why they matter to you. Let’s take that apart.
Mutable objects bundle three concerns that are distinct in Elixir: state, behavior, and time. Take this example:
If this were like most object-oriented ...