Know Your Elixir Datatypes
In this chapter, we focused on what it means to work with data in the Elixir language. We started with basic datatypes such as atoms and numbers, paying close attention to the traps related to float precision and exhausting the atom table, which can crash the BEAM.
We moved on to lists and maps. For lists, we showed a representation of lists in memory. We emphasize the need to access lists head first. Maps and structs are arguably the workhorses of the language. Access, both read and write, were extremely fast and this datatype is appropriate for a wide list of purposes.
Next, we tackled strings and tuples. We worked through the differences between strings and charlists and practiced accessing elements of a binary. ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access