A short introduction to Elixir presented by Chi-chi Ekweozor at Manchester UK's MadLab on 20 February.
Learn how to use the ubiquitous pipeline operator |> to consume functions as data, pattern matching, modules, lists and other language constructs.
2. “Elixir is a dynamic, functional language with
Ruby-like syntax that runs on the Erlang virtual
machine. It can be described as the language
for the modern, real time, hyper-connected
world with first class support for concurrency,
fault tolerance and high availability, all courtesy
of its Erlang pedigree.”
3. • Elixir is a functional language. There are two
things to remember:
Immutable data: any function that transforms
data will return a new copy of it
We can combine functions, and run them in
parallel if we please, using lightweight Elixir
‘processes’
4. Learn Elixir
• Install Elixir
• What is pattern matching?
• Meet Lists, and Modules
• Meet the Pipe Operator |>
• Resources for learning
27. We’ve all seen code like this:
people = DB.find_customers
orders = Orders.for_customers(people)
tax = sales_tax(orders, 2016)
filing = prepare_filing(tax)
28. The alternative was to write:
filing = prepare_filing(sales_tax(Orders.for_customers(DB.find_customers),
2016))