Elixir
PopularA functional language built on the battle-tested Erlang VM, designed for massive concurrency and fault-tolerant systems.
Elixir
Getting Started
A functional language built on the battle-tested Erlang VM, designed for concurrency, fault tolerance, and systems that stay up.
Getting Elixir, Erlang, and the mix build tool set up on your machine, and confirming everything works.
Writing and running a standalone .exs script, and understanding how it differs from a compiled mix project.
Syntax & Data Types
Why Elixir data never mutates in place, and what that means for how you write everyday code.
A tour of Elixir's core built-in types -- atoms, tuples, lists, maps, and more -- and when to reach for each one.
Pattern Matching & Control Flow
How the = operator actually works in Elixir, and why pattern matching is the language's most fundamental idea.
Elixir's three branching constructs, and how to pick the right one based on what you're actually deciding between.
Adding extra boolean conditions to pattern matches with when, and the restricted set of expressions guards allow.
Collections
A deeper look at Elixir's two ordered collection types, how they're stored differently, and what that means for performance.
Elixir's two key-value structures -- when to use a map versus a keyword list, and the operations each supports.
Functions
How Elixir organizes code into modules and named functions, including multiple clauses and default arguments.
Functions as values in Elixir -- the fn syntax, the capture shorthand, and closures over surrounding variables.
How |> turns nested function calls into a readable left-to-right pipeline, and the conventions that make it work well.
Error Handling
How Elixir handles failure -- {:ok, _}/{:error, _} tuples, try/rescue, and the with construct for chaining fallible steps.
Concurrency & OTP
The BEAM's lightweight processes -- how to spawn them, why they're nothing like OS threads, and how they communicate.
Building stateful, message-handling processes the standard way, using OTP's GenServer behaviour instead of raw receive loops.
How OTP supervisors implement "let it crash" -- watching processes and restarting them automatically when they fail.
Ecosystem & Best Practices
Elixir's flagship web framework -- its request pipeline, why it handles massive concurrent connections well, and what LiveView adds.
A closing checklist of habits that separate idiomatic, maintainable Elixir from code that merely runs correctly.