Recs.
Updated
Elixir is a functional, concurrent, general-purpose programming language that runs on the Erlang virtual machine.
SpecsUpdate
Pros
Pro Great concurrency and scaling
Processes in the Erlang VM are lightweight and run across all CPUs. Thread handling is simpler and more intuitive, and does not require developers to specifically impliment multi-threaded solutions. With multi-core CPUs now mainstream, and octocore not uncommon, this will have a significant effect on performance now, and likely more-so in the future.
Pro Built-in support for hot-upgrades and hot-downgrades
As built for telecommunications system Erlang VM requires support for application updates without interruptions in running system (imagine that your call was unexpectedly ended due to software upgrade in your provider relay station). This allows you to update your system without disconnecting your users from yours services.
Pro Full access to Erlang functions
You can call Erlang functions directly without any overhead: https://elixir-lang.org/getting-started/erlang-libraries.html
Cons
Con Lack of static typing
Should be mentioned that Elixir also has its own way to check type safety : pattern matching, guards, typespecs and dialyzer.
Con Takes some time to wrap your head around around OTP supervisors trees
This (unique?) feature of the OTP is quite uncommon and takes some time to get into understanding what is going on, when, and how to use all it's features and servers like GenServer
, Agent
, etc.
Con Some design choices may seem strange
Some design choices could have been a little more appealing, for example: using "do...end" comes natural in Ruby for blocks but Elixir uses them for everything and it looks pretty weird:
Enum.map [1, 2, 3], fn(x) -> x * 2 end
or
receive do
{:hello, msg} -> msg
{:world, msg} -> "won't match"
end