Built-in Types
Elixir’s built-in types are
-
Value types:
-
Arbitrary-sized integers
-
Floating-point numbers
-
Atoms
-
Ranges
-
Regular expressions
-
-
System types:
-
PIDs and ports
-
References
-
-
Collection types:
-
Tuples
-
Lists
-
Maps
-
Binaries
-
In Elixir, functions are a type too. They have their own chapter, following this one.
You might be surprised that this list doesn’t include things such as strings and structures. Elixir has them, but they are built using the basic types from this list. However, they are important. Strings have their own chapter, and we have a couple of chapters on lists and maps (and other dictionary-like types). The maps chapter also describes the Elixir structure facilities.
Finally, there’s some debate about whether regular expressions ...
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