What's inside
- Intro
- What is Elixir?
- What functions does it offer?
- When is Elixir a good choice?
- A developer’s quick guide
- Obtaining knowledge
- Is Elixir 2.0 going to happen?
- Drawbacks of Elixir
- Is Elixir worth a sip?
- Contact us
- Read more
Intro
Elixir is a truly mature language that is gaining more and more interest among many different devs.
What’s the actual state of its development and environment, what skills are crucial to making programming in Elixir smooth and pleasant, and what will the future bring?
Here are specific characteristics of the language that can soon rule the world.
What is Elixir?
While this name may sound somewhat enigmatic and associated with everything but IT, Elixir is a general-purpose programming language. Its author, José Valima, started bringing it to life in 2012. Now, specialists refer to Elixir as the successor to Ruby, at the same time stating that the number of programmers who know the language perfectly is not large enough for it to be used widely in business. But is this really the case?
Elixir is primarily a functional language run by the Erlang VM. Unlike Ruby, it allows for a completely different model of program execution. The features that define it best are its concurrency and actor model.
What's more, Elixir allows you to program highly reliable, efficient, and performance applications.
What functions does it offer?
New versions of Elixir introduced in 2020, 1.10 and 1.11, came with some quite essential features:
- Making it easier to specify the sorting direction in the Enum module (shortcuts :asc, :desc).
- Clearer distinction between compile-time and run-time configuration.
- Compiler tracing - new possibilities to respond to compiled events.
- Tighter integration with Erlang for logging and documentation access.
- Additional verifications at compile time: application delineation tracking, verification of correct use of structure fields.
- Faster compilation due to improved tracking of dependencies between modules.
All the improvements above and many smaller ones not included in the list are good signs for the future of programming in Elixir.
After all, it is a specialized language, powerful in its niche, and needs an active community and discerning users to develop. Elixir's creators have been very open and active since its launch and, most importantly, responsive to feedback from developers.
When is Elixir a good choice?
This programming language is the optimal solution wherever we need performance and reliability at a very high level.
It can support telecommunications systems, i.e., wherever we need to maintain thousands of connections. Hence, people who consider a career as Elixir programmers will work well for quite a several IT companies where it is essential to maintain the proper functioning of applications on the network side. These could be industries like Human Resources or Fintech.
Elixir will also work well for systems handling high volumes of requests and needing high reliability. One of the flagship examples is RabbitMQ, a queuing system that supports the AMQP protocol. It was written in Erlang (Elixir didn't exist yet) and is used to integrate modules or microservices in various languages. It's easy to use, fast, and just works.
A developer’s quick guide
So, what are the foundations for a developer to work seamlessly in Elixir?
Relatively small community
The demand for senior specialists in Elixir continues to outstrip the supply, and many companies are struggling to recruit. Some have entirely changed their recruitment strategy and are looking for specialists in other technologies (such as Ruby or React) to train.
Crucial database knowledge
Almost every Elixir developer will develop applications that use some form of SQL to store data. An important addition here will be Ecto - the basic library used to access data.
Server infrastructure and HTTP
An understanding of DevOps practices can come in very handy - whether you are doing operational tasks yourself or working with a DevOps team.
Before digging deeper into Phoenix, Absinthe, or any web framework, it would be advisable to learn things like the request-response cycle, the difference between the POST and PUT, and what 4xx and 5xx are. The modern Internet is not only HTTP but is almost always the main foundation.
Concurrency
When other languages actually simulate concurrency using computational tricks, Elixir is truly concurrent. By basing concurrency on an actor model, individual processes share data by passing messages instead of passing messages by sharing data, which makes a huge difference.
Ambitious Elixir developers should have a good understanding of the difference between this model and threading. The transition from concurrent to distributed systems should be easy if they do.
Pipeline
Elixir is a functional language, and as such, it pushes hard for data processing that can be described as a "pipeline," i.e., a composite of functions that transform one piece of data into another, keeping in mind that data in Elixir is immutable. With a little experience, libraries such as GenStage and Flow will allow you to work efficiently in a distributed environment which is one of Elixir's main advantages.
Obtaining knowledge
Because Elixir is not the most popular programming language, practicing it and obtaining valuable information can cause problems.
Fortunately, there are more specialized training courses where experienced developers share their knowledge with trainees. Confirmation of the skills you have acquired will be the certificate you earn. You can learn about Elixir from boot camps and train on your own - groups, thematic forums, or valuable instructional videos and blogs run by specialists will prove helpful.
Is Elixir 2.0 going to happen?
Elixir is built on Erlang/OTP, so its creators and developers benefit from all the work done by Ericsson and the OTP team in terms of runtime and VM.
It has been designed as an extensible language, meaning that the tools and abstractions used to create and improve the language are also available for libraries and frameworks. It allows the community to develop the ecosystem without digging into the language itself.
Thus, as of today, Elixir 2.0 is a song of the distant future that should not be taken as Elixir's disadvantage.
Drawbacks of Elixir
As with every other programming language, Elixir has flaws. First of all, it's difficult. Helloworld seems ridiculously easy. Writing your first page in Phenix is not a challenge either. The problem begins with its immutability and its many hidden crumbs. If you learn about lists in various languages such as Python, C#, C++, Javascript, Java, or PHP, the basic implementation is ArrayList. Even when it's not, they have auxiliary fields to hold size.
In Elixir, the list is a linked list implementation, and checking its size has a complexity of O(n)!. Accessing the first element of the list has a complexity of O(1), but accessing the last one is already O(n). This makes it easy to write an algorithm that will work correctly but will be highly suboptimal. We won't notice it by writing simple code and testing it dry. Problems will arise when the program goes into production, and real traffic slows the whole thing down to an unacceptable level.
In addition, the actor model solves many problems but is more difficult to use. It looks cool on paper and works well as long as there is no problem. However, if we make a bug, it will take much longer to find it than if we look for it in a regular blocking system.
This leads to large software development costs. Sometimes this is worthwhile, and sometimes there is no other option. However, when such a need does not exist, it is better to choose a more popular tool where it is easier to find programmers. This is why simple websites are not written in Elixir, even though the Phoenix framework encourages it.
However, the cost of software development doesn't always matter. E.g., when we write out of passion, for ourselves, or self-development. And this is also where Elixir takes the brilliance.
Is Elixir worth a sip?
Is it worth delving into Elixir? Well, for sure, knowing Elixir can be an asset. Using Elixir will allow you to fill a niche in the job market, and knowing it will make you a more attractive and valuable candidate to a future employer. Recent years have shown that Elixir is a language that is constantly evolving. It's time to give it a chance if you didn’t work with it yet!
Contact us
At Sunscrapers, we have a team of developers and software engineers with outstanding technical knowledge and experience. We can build your project successfully. Talk with us about hiring Python and Django developers and work with the best.
Sunscrapers can help you make the most out of Python, Django, and other technologies to put your project to the next level.
Contact us at hello@sunscrapers.com