Elixir vs Erlang 2020

Devathon
5 min readJun 16, 2020

--

What is Elixir?

José Valim, a software engineer from Brazil had created Elixir. The language first appeared on the scene in 2011. Valim created Elixir on top of Erlang, another powerful language. In addition to including features from Erlang, Valim also included features from Ruby and Clojure.

Elixir runs on the Erlang Virtual Machine, and it’s a general-purpose programming language. This open-source language emphasizes on functional programming, concurrency, and fault tolerance. This dynamically-typed language features several similarities with Erlang.

Organizations use this language to build distributed web applications with fault tolerance. At the time of writing, the latest stable release of Elixir is 1.10.3, which came on 25th April 2020.

Companies that use Elixir:

  • PagerDuty
  • Discord
  • E-Metro Tel
  • Pinterest
  • Moz

Most developers coding in Elixir use Phoenix, a powerful framework that uses several features of Ruby on Rails. Some of the other popular open-source frameworks for this language are as follows:

  • Nerves
  • Sugar
  • Hedwig
  • Plug
  • Trot

……………………

What are the similarities and differences between Elixir vs. Erlang — Click here to read more

……………………

What is Erlang?

Joe Armstrong, Robert Virding, and Mike Williams created Erlang as a proprietary software of Ericsson. The first release of Erlang as a free and open-source language came in 1998. This general-purpose programming language focuses on functional programming and concurrency.

Erlang is also often referred to as Erlang/OTP, where “OTP” stands for “Open Telecom Platform”. OTP includes the garbage-collected Erlang runtime environment, many ready-to-use components, and a set of design principles.

Businesses use Erlang to build distributed web applications with fault-tolerance.
Erlang helps to create systems with high availability. This language enables “hot-swapping”, which allows changing the code without stopping the system. At the time of writing, the latest stable release of Erlang is 23.
This release came on 13th May 2020.

Companies that use Erlang:

  • Ericsson
  • Nortel
  • T-Mobile
  • WhatsApp
  • Goldman Sachs
  • Nintendo

The followings are a few popular web frameworks for Erlang:

  • Erlang OTP
  • Yaws
  • Axiom
  • ChicagoBoss
  • Cowboy

Pros of Elixir

  • Scalability: Elixir helps you to create scalable apps. Let’s assume that you need to run a service that needs to aggregate responses from several other services. Elixir lets your program do this simultaneously, which is quicker than collecting these responses sequentially.
  • Maintainability: By its very design, Elixir prompts you to code simpler programs. This functional language has fewer abstractions than many other languages, which makes it simpler. Simpler code results in fewer bugs, which makes maintenance easier.
  • Concurrency with performance: Elixir offers concurrency, i.e., many processes can run simultaneously. Many other languages offer this, however, performance often degrades when multiple processes run simultaneously. Elixir prevents that since it runs on the Erlang VM.

Cons of Elixir

  • Costlier developers: Elixir is a relatively new language and fewer developers know this than other leading languages. It can cost quite a bit to find competent Elixir programmers.
  • Weaker ecosystem: The ecosystem of Elixir is still work-in-progress, and you might find it hard to suitable libraries for some functions.
  • The importance of knowing Erlang: The best Elixir developers know Erlang quite well. For delivering powerful software using Elixir, the knowledge of Erlang is important. This prerequisite makes it harder to find competent Elixir programmers.
  • Performance degradation when performing large-scale number-crunching tasks: While Elixir performs well when handling many concurrent tasks, its performance can degrade while performing large-scale number crunching.

Here is the full guide where we explain the differences between Elixir & Erlang and choosing the right language for your next web development project!

Pros of Erlang

  • Ease-of-use: Erlang values simplicity. This language uses the functional programming paradigm, which encourages simplicity. Erlang goes further since its syntax allows simpler programming.
  • Suitable for high-availability systems: Erlang offers fault tolerance, which helps you to create systems with high availability.
  • Support for concurrency: Not only does Erlang supports concurrency, but you can develop concurrent programs easily. You can also scale and distribute these programs easily.
  • Reliable community support: The Erlang developer community isn’t the largest, however, it’s very mature. You can get excellent support from this community.

Cons of Erlang

  • Hard to deploy: New Erlang developers can find it hard to set up, provision, and deploy Erlang applications.
  • Complex debugging: New Erlang programmers can find it hard to debug exception-related errors since the error-reporting isn’t very user-friendly.
  • Hiring challenges: Although two decades have passed since Erlang has been open-sourced, the language isn’t a popular as some of the leading languages. You can find it hard to hire Erlang developers.

Which one should you choose? Elixir vs Erlang

  1. You are building a large, distributed, and high-availability web app: Both Elixir and Erlang support concurrency and fault tolerance. They are both good candidates for building large and distributed systems that have high-availability requirements. However, Elixir fares better than Erlang in this regard. It supports concurrency without any notable degradation of performance.
  2. Your system will do a lot of number-crunching: You should choose Erlang in this case. While Elixir is highly performant in most cases, it sees a degraded performance when a lot of number-crunching is at play.
  3. You have a constrained budget for development manpower: Choose Erlang. Elixir developers are harder to find and they are more expensive. Highly competent Elixir developers must know Erlang, and this prerequisite makes it harder to find them.
  4. You have a development team with a medium level of experience: You should choose Erlang over Elixir. Erlang has powerful operators that let developers achieve more with less coding. This language has more frameworks, which help mid-level developers to achieve productivity. Two caveats here: (a) Both Erlang and Elixir are dynamically-typed languages and require experienced developers. (b) In some cases, debugging the Erlang code can be complex.
  5. You have a highly experienced development team: You should choose Elixir. It offers greater freedom than Erlang, and experienced developers can utilize it to build powerful applications quicker. Since Elixir offers better documentation, programmers can find more help when they use powerful features.
Email us: hello@devathon.com
WhatsApp: Click to chat
Messenger: Click to chat
Devathon

Devathon makes quality and affordable web and mobile applications for startups, growing businesses, and entrepreneurs.

--

--

Devathon

Web design & development company that builds quality & affordable iOS, Android & Web apps for Startups.