Recs.
Updated
Elixir is a dynamic, functional language designed for building scalable and maintainable applications.
SpecsUpdate
Pros
Pro Interactive environment gives immediate feedback
Elixir comes with an interactive environment out of the box. After installing Elixir, simply run iex
(which stands for Interactive Elixir) to open the environment.
In this mode you can type any Elixir expression and get immediate feedback.
Pro Dynamic typing makes it easier to get into working code quickly
Pro Full access to Erlang functions
You can call Erlang functions directly without any overhead.
https://elixir-lang.org/getting-started/erlang-libraries.html
Pro Easy introduction to pipelines
Excessive or poorly/too similarly named intermediate variables are a common cause of messy, convoluted code--pipelines reduce the need for intermediate variables. Introducing them in Elixir prepares programmers so they they are familiar with the concept in other languages. It also encourages function chaining, which is both very much in the spirit of functional programming and also discourages OOP-style conventions. Example:
def main do
size = get_input()
|> List.first
|> String.to_integer
size
|> matrix_gen
|> diagonal_sum(size)
|> abs
|> IO.puts
end
def matrix_gen(size) do
for x <- 1..size do
row = get_input()
{row, x - 1}
end
Cons
Con Eccentric syntax
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
Recommendations
Comments
Flagged Pros + Cons
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