Appearance
Glossary
This page lists the terms that the pages use, with a short definition of each. On a page, the first mention of a term has a dotted underline. To see the definition, hover over the term, focus it, or tap it. The definitions paraphrase the official Elixir docs. Each definition links to the page that explains the term.
- #Agent
- A simple wrapper around state: a process that you read and update with functions that you pass to it.Read the page
- #Application
- Every Elixir project is an application. Elixir itself is an application (
:elixir), and so are parts of it such as:ex_unit.Read the page - #AST
- Abstract Syntax Tree. Elixir represents code as nested tuples in the shape of a tree, and calls them quoted expressions.Read the page
- #Atom
- A constant with a value that is its own name, such as
:ok. Two atoms are equal if their names are equal.Read the page - #Behaviour
- A module such as
GenServerorSupervisorthat defines the callbacks that your module implements, so that your module can run as that kind of process. Your module declares it with@behaviouror withuse.Read the page - #Binary
- A bitstring with a number of bits that 8 divides without a remainder. Every binary is a bitstring, but not every bitstring is a binary.Read the page
- #Callback
- A function that your module defines and that a process behaviour calls under specific conditions, for example
init/1orhandle_call/3for a GenServer.Read the page - #Charlist
- A list of code points, written
~c"like this". It is mostly for interoperability with Erlang.Read the page - #Child specification
- A map that tells a supervisor how to start, shut down, and restart one child. You usually write it as
{module, options}or only the module name.Read the page - #Comprehension
- Syntactic sugar for a loop over an enumerable that filters and maps. The
forspecial form groups these operations.Read the page - #Doctest
- An example in a documentation string. It has an
iex>prompt and the expected result on the next line. ExUnit checks it as a test, so the documentation stays correct.Read the page - #ETS
- Erlang Term Storage: the
:etsand:detsmodules store large data structures in memory or on disk.Read the page - #Exit signal
- The message that a process sends along its links when it ends. A linked process that does not trap exits also ends, unless the reason is
:normal.Read the page - #GenServer
- A "generic server": a process that holds state and offers synchronous (call) and asynchronous (cast) requests, code reloading, and more.Read the page
- #Guard
- An extra condition on a clause, written after
when. A clause matches only if the pattern matches and the guard is true.Read the page - #Immutability
- Elixir never changes data structures in place. Operations return new data structures. You can pass data around and know that nobody changes it in memory. They can only transform it.Read the page
- #Keyword list
- A list of tuples with two elements, where the first element, the key, is an atom. The keys keep the order that you gave and can repeat. People mostly use them for optional arguments to functions.Read the page
- #Link
- A relationship between two processes for the case of failure. If one process fails, the other process receives an exit signal. Without a link, a failure in one process never crashes another process.Read the page
- #Macro
- Code that receives quoted expressions and changes them into something else. Macros are harder to write than functions, and it is bad style to use them when you do not need them.Read the page
- #Macro hygiene
- Macros have "late resolution": a variable that you define inside a
quotedoes not conflict with a variable in the code where the macro is expanded.Read the page - #Mailbox
- The place where the messages that were sent to a process wait.
receive/1searches it for a message that matches a pattern. A send does not block: the sender puts the message in the mailbox and continues.Read the page - #Monitor
- A one-way method to track when a process dies, without a tie between exit signals. When the monitored process ends, the watcher gets a message, for any reason.Read the page
- #Node
- A running Erlang VM that can connect to other nodes. Processes are location transparent: a message works in the same way if the recipient is on this node or on another node.Read the page
- #OTP
- Open Telecom Platform: the set of libraries in Erlang that you use to build fault-tolerant applications. It includes supervision trees and event managers.Read the page
- #Pattern matching
- The
=operator is the match operator. It matches simple values, and it also destructures complex data such as tuples and binds variables to the parts.Read the page - #PID
- A process identifier.
spawn/1returns it, andsend/2takes it to reach that process.Read the page - #Pipe operator
|>takes the result of the expression on its left and passes it as the first argument of the call on its right. It makes the data that changes easy to see.Read the page- #Process
- The unit of concurrency in Elixir. All code runs inside a process. Processes are isolated and concurrent, and they communicate by messages. They are not operating system processes. They are light enough that you can run hundreds of thousands of them.Read the page
- #Protocol
- A mechanism for polymorphism: the behavior depends on the data type, and the dispatch is on the type of the first argument. Anyone can implement a protocol, at any time.Read the page
- #Quoted expression
- The Elixir name for the AST: code as nested tuples.
quoteproduces it andunquoteinserts values into it.Read the page - #Sigil
- A custom textual representation. It starts with
~, then a letter and a delimiter, with optional modifiers after the last delimiter. You can define your own sigils.Read the page - #Struct
- An extension that is built on top of maps. It adds compile-time checks and default values.Read the page
- #Supervision tree
- Supervisors that have supervisors as children. The processes of an application then form a tree.Read the page
- #Supervisor
- A process that detects when its children die and starts new children in their place. Processes are often linked to a supervisor for this reason.Read the page
- #Task
- An asynchronous computation. You start it now and read its result later.Read the page
- #Trapping exits
- The call
Process.flag(:trap_exit, true). Exit signals then arrive as ordinary messages and do not end the process. Supervisors do this to survive their children.Read the page - #Tuple
- A fixed collection with curly brackets that can hold any value. Its elements are stored one after the other in memory, so it is fast to read one element by index or to get the size.Read the page