The Elixir language is quite complex. Most of its elements are more complex than they first appear. In the first module, we will look at modules and functions, basic data types and operations with them.
The Elixir language is quite complex. Most of its elements are more complex than they first appear. In the first module, we will look at modules and functions, basic data types and operations with them.
In the second module we will continue to get acquainted with different data types: atoms, tuples, lists and dictionaries. If you are not familiar with functional programming, even at this stage, some of it may already seem strange. But don't be frightened, it's not hard to use all of this.
Elixir is a bright representative of the family of functional languages. It's time to learn what functional programming is, what elements it consists of, and how it differs from other programming paradigms.
We have already been introduced to one of the most important elements of FP - pattern matching. Now let us consider the other elements: immutability, recursion, higher-order functions, and anonymous functions.
In this module, we will study typical ways of working with lists and other collections: map, filter, and reduce. We will get acquainted with the Enum module, the workhorse for all collections. We will also study list constructors (lists comprehension) and streams.
In Elixir, all code runs inside processes. Processes are isolated from each other, run in parallel, and communicate via messaging. Processes are not the only basis for parallel operation, but they provide the basis for building distributed and fault-tolerant programs. In this module, we will look at the processes and actor model that underlie the language.
In this module we will look at metaprogramming in the Elixir language. Thanks to macros, you can greatly extend the expressiveness of the language by creating DSLs, but the use of macros is black magic, so they must be used with care and understanding.