Paradigm | multi-paradigm: functional, concurrent, distributed, process-oriented |
---|---|
First appeared | 2011 |
Stable release |
1.4.0 / 5 January 2017
|
Typing discipline | dynamic, strong |
Platform | Erlang |
License | Apache License 2.0 |
Filename extensions | .ex, .exs |
Website | elixir-lang |
Influenced by | |
Erlang, LFE,Ruby, Clojure | |
Influenced | |
LFE |
Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine (BEAM). Elixir builds on top of Erlang and shares the same abstractions for building distributed, fault-tolerant applications. Elixir also provides a productive tooling and an extensible design. The latter is supported by compile-time metaprogramming with macros and polymorphism via protocols.
Elixir is successfully used in the industry by companies such as Pinterest and Moz. Elixir is also used for web development, by companies such as Bleacher Report and Inverse, and for building embedded-systems. The community organizes yearly events in both United States and Europe as well as minor local events and conferences.
José Valim is the creator of the Elixir programming language, an R&D project of Plataformatec. His goals were to enable higher extensibility and productivity in the Erlang VM while keeping compatibility with Erlang's ecosystem.
The following examples can be run in an iex shell or saved in a file and run from the command line by typing elixir <filename>
.
Classic Hello world example:
Comprehensions
Pattern Matching
Modules
Sequentially spawning a thousand processes
Asynchronously performing a task