Elixir (programming language): Difference between revisions
Appearance
Content deleted Content added
No edit summary |
Docstring syntax comes from Python |
||
Line 29: | Line 29: | ||
* Meta programming allowing direct manipulation of [[Abstract syntax tree|AST]]<ref name="elixirhome" /> |
* Meta programming allowing direct manipulation of [[Abstract syntax tree|AST]]<ref name="elixirhome" /> |
||
* [[Polymorphism (computer science)|Polymorphism]] via a mechanism called protocols. ''Enumerable'' is an example of a protocol, and is inspired by [[Clojure]] reducers <ref>{{ city web|url=https://pminten.github.io/blog/2013/09/05/elixirs-enumerable/|title=Elixir Enumerable| accessdate=2014-09-07}}</ref> |
* [[Polymorphism (computer science)|Polymorphism]] via a mechanism called protocols. ''Enumerable'' is an example of a protocol, and is inspired by [[Clojure]] reducers <ref>{{ city web|url=https://pminten.github.io/blog/2013/09/05/elixirs-enumerable/|title=Elixir Enumerable| accessdate=2014-09-07}}</ref> |
||
* Support for documentation via |
* Support for documentation via Python-like docstrings in the Markdown formatting language <ref name="elixirhome" /> |
||
* [[Shared nothing architecture|Shared nothing concurrent programming]] via message passing ([[Actor model]]) |
* [[Shared nothing architecture|Shared nothing concurrent programming]] via message passing ([[Actor model]]) |
||
* Emphasis on [[recursion (computer science)|recursion]] and [[higher-order function]]s instead of [[side-effect (computer science)|side-effect]]-based [[loop (computing)|looping]] |
* Emphasis on [[recursion (computer science)|recursion]] and [[higher-order function]]s instead of [[side-effect (computer science)|side-effect]]-based [[loop (computing)|looping]] |
Revision as of 20:38, 22 September 2014
This article needs additional citations for verification. (March 2013) |
Paradigm | multi-paradigm: functional, concurrent, process-oriented, homoiconic |
---|---|
First appeared | 2012 |
Stable release | 1.0.0
|
Typing discipline | dynamic, strong |
Platform | Erlang |
License | Apache License |
Filename extensions | .ex, .exs |
Website | www |
Influenced by | |
Erlang, Ruby, Clojure |
Elixir is a functional, concurrent, general-purpose programming language built atop the Erlang Virtual Machine (BEAM). Elixir builds on top of Erlang to provide distributed, fault-tolerant, soft real-time, non-stop applications but also extends it to support meta-programming with macros and polymorphism via protocols.[1]
History
José Valim is the creator of the Elixir programming language. His goals were to enable higher extensibility and productivity in the Erlang VM while keeping compatibility with Erlang's tools and ecosystem.[2]
Features
- A language that compiles to byte code for the Erlang Virtual Machine (BEAM)[3]
- Everything is an expression[3]
- Erlang functions can be called from Elixir without runtime impact, due to compilation to Erlang byte code, and vice versa
- Meta programming allowing direct manipulation of AST[3]
- Polymorphism via a mechanism called protocols. Enumerable is an example of a protocol, and is inspired by Clojure reducers [4]
- Support for documentation via Python-like docstrings in the Markdown formatting language [3]
- Shared nothing concurrent programming via message passing (Actor model)
- Emphasis on recursion and higher-order functions instead of side-effect-based looping
- Lightweight concurrency utilizing Erlang's mechanisms with simplified syntax (e.g. Task)[3]
- Lazy and async collections with streams
- Pattern matching [3]
- Unicode support and UTF-8 strings
References
External links
- Elixir language website
- Code on GitHub
- Elixir - A modern approach to programming for the Erlang VM video presentation
- Dave Thomas: "Programming Elixir: Functional |> Concurrent |> Pragmatic |> Fun" (book)
- Simon St. Laurent, J. David Eisenberg: "Introducing Elixir" (book)
- Joe Armstrong: "A Week with Elixir" (blog entry)