Elixir, a functional programming language created in 2012 by José Valim, is built on top of the Erlang virtual machine. Though still considered a niche player among programming languages, Elixir is quickly gaining popularity for its many advantages and ease of use.
In 2014, v1.0 was released and the first elixir conference was held with under 100 people in attendance. Today, v1.9.2 is in use and the annual Elixir Conference hosts thousands of people with attendance growing each year. Elixir is considered a mature language and feature-complete, meaning the language itself is set, with only minor optimizations released.
José wanted to explore the use of concurrency in programming, which allows multiple computations to happen in parallel. Elixir takes advantage of multi-core processors in most computers today. This means processing can scale to use all available resources on a machine automatically. Another unique characteristic of Elixir is that it uses pattern matching, which allows for the matching of simple values, data structures, and functions. Think of pattern matching as a very advanced if statement or switch case statement, which is a very powerful tool.
In 2015, Phoenix was introduced and is now the go-to framework for creating web applications with Elixir. Similar to Rails, Phoenix uses a server-side model-view-controller (MVC) pattern and builds on Elixir’s philosophy of developer productivity and speed. Phoenix layers consist of Cowboy, the default web server, Plug, the specs for constructing modules for building web apps, and Ecto, a language for reading and writing databases.
Tools created for Elixir have improved day-to-day development and productivity and allow engineers to set up new web applications fairly quickly. Elixir and Phoenix have first-class build and release tools; package management, project scaffolding, testing, and documentation are all available out of the box. Elixir engineers also benefit from tools built for Erlang, like Observer and Dialyzer.
For a software engineer with Ruby experience, the Elixir language is fairly easy to pick up and learn on the job. Compared to Erlang, syntax is much simpler making it more accessible. Additionally, the community of engineers who work in and maintain Elixir is supportive, approachable, and collaborative, which makes finding resources and answers easier.
Luke first discovered Elixir while building an autopilot for his sailboat, since he had heard Elixir was really good for concurrency. He asked if he could use Elixir in projects at Revelry, which got Joel and Robert interested. Soon after, Bryan Joseph joined the team; Bryan was an early contributor and author of Elixirscript.
Many talented engineers with a Ruby on Rails background find that learning Elixir and Phoenix is typically a fairly smooth transition due to similar controller, router, templates, and database models. Pattern matching, once learned, can be very useful and makes for cleaner code. Each process can be collected independently, so if something goes wrong with one process, then it doesn’t take everything down.
Deploy your first app within 24 hours. Book a demo to get started.