Elixir (1.20)
This assessment applies the coupling account — coupling as access to a shared resource, and the coupling floor [1], [2] — and the knowledge-embodiment theorem [3]; the language is assessed against its official reference [4].
Snapshot Elixir (1.20) — released 3 June 2026 · lifecycle current
Family Elixir — shelf: Application
The language’s main business is building general application software, with a managed runtime or a rich standard library. A shelf groups; it does not classify — the tags below carry every use, paradigm, and platform of this snapshot.
Trajectory 1.0 (September 2014 — first stable release) · 1.20 (3 June 2026 — gradual typing)
Tags
Use — Application, Web back end
Paradigm — Functional, Concurrent
Platform — BEAM
Lifecycle — Current
Memory — Managed (GC)
Typing — Dynamic
Resources
The language’s official entry points, and the documents that name the release this page assesses. A link marked this release pins the document to Elixir (1.20); an unmarked link is the current reference for the language.
Landing page
API documentation
Tutorial
Package registry
1 Assessment
This page assesses Elixir in five parts: core coupling — what the language’s own constructs force; ecosystem coupling — what the surrounding platform, tooling, and community cost; engineering readiness — whether the artifact can be reproduced, verified, observed, worked in quickly, connected to other languages, and governed openly; the profile — the unscored facts a score cannot express; and the scoring detail — the mechanism marks and the arithmetic behind every score. A ✅ bullet marks a construct that helps. A ⚠️ or ❌ bullet marks a cost; the scoring model does not price every cost named here.
Core coupling 79.7/100 · Ecosystem coupling 90.6/100 · Engineering readiness 70.8/100
1.1 Core coupling
1.1.1 Type
- ❌ Dynamic typing: A term carries its type at run time, so
Map.get/2on a list fails only when the call executes (T1) - ❌ No declared types on functions: A
defhead names patterns, not types, and the language has no type parameter or generic (T5) - ❌ No sum types in the type system: Alternatives are tagged tuples such as
{:ok, value}and{:error, reason}, checked by pattern matching rather than by a type (T4) - ❌ Dispatch is by run-time shape: A protocol or a pattern chooses a clause from the value it receives, so no static check selects the branch (T3)
- ✅
@specand Dialyzer give optional static analysis: A success-typing pass detects a call whose arguments contradict the specification - ⚠️ Gradual set-theoretic types are being added: The work is in progress, so the language is dynamic today
1.1.2 Construction
- ✅ Every value is immutable: A term cannot be changed in place, so construction never aliases mutable state
- ✅
defstructdeclares the record shape:%User{name: "Ada"}builds a struct, and an unknown key is a compile-time error - ✅
@enforce_keysvalidates at construction: A struct with required keys cannot be built without them - ✅ The pipe operator decouples data flow from nesting:
data |> parse() |> validate()reads left to right as a chain of transformations - ✅ Processes hold state, not objects: A
GenServerkeeps its state inside its own process, and a caller reaches it by message - ✅ Mutable state lives in a named process or table:
Agent,ETS, and:persistent_termgive shared state an explicit owner, so a reader can find it and an owner can delete it - ✅ Nothing mutable is shared: terms move by value semantics, so a write has no second name to reach (C6)
1.1.3 Memory
- ❌ BEAM collection is non-deterministic: A process collects its heap when it grows, so the program does not choose the moment (M2)
- ✅ Each process has a private heap: A collection pause is per-process and short, and there is no global stop-the-world collection
- ✅ No manual deallocation: The VM reclaims memory, and a program never frees a term
- ✅ Large binaries live off-heap and are reference counted: A binary above the heap-binary threshold is shared between processes rather than copied
- ⚠️ A large live set costs more to collect: A long-lived
GenServerthat accumulates state pays a higher collection cost - ⚠️ An ETS table lives outside the collector: The table persists until its owner deletes it or dies
- ❌ The undeclared class has no catch: BEAM’s atom-table exhaustion fails the node (documented), beyond the supervision tree’s restarts (Er6)
1.1.4 Error
- ❌ Exceptions are unchecked:
raiseandthrowappear in no signature, so a caller cannot read the failure set from the type (Er2) - ✅ “Let it crash” plus supervision decouples recovery from business logic: A
Supervisorrestarts a failed child, so the recovery path is not interleaved with the normal path - ✅ Tagged tuples are the idiom for an expected failure:
{:ok, value}and{:error, reason}keep the failure inside the returned value - ✅
withcomposes a chain of expected results: Each<-clause fails through to theelsebranch without nesting - ✅ Links and monitors make propagation explicit:
spawn_linkandProcess.monitordefine which process observes a failure - ⚠️ The tagged-tuple convention is not a type: Nothing forces a caller to match the
:errorcase, so the discipline is social
1.1.5 Concurrency
- ✅ Processes are the unit of concurrency: A BEAM process shares no memory and communicates by message, so a race between processes cannot occur
- ✅ The BEAM schedules preemptively: A long computation is reduced and rescheduled, so one process cannot block a scheduler
- ✅ OTP gives structured, supervised concurrency:
Task,Task.Supervisor,GenServer, andSupervisorare library primitives over the process model - ✅ Immutability removes locks from the model: A message carries a value, and the receiver holds its own copy of the terms
- ✅
Task.asyncandTask.awaitpair a spawn with a result: The caller collects results without a hand-written join - ⚠️ A slow consumer accumulates messages: An unbounded mailbox grows until the process is restarted
1.1.6 Platform
- ✅ The BEAM is the only requirement: Elixir code runs on any platform that runs an Erlang VM
- ✅ Erlang interop is direct: Elixir calls Erlang modules and libraries without a binding layer
- ✅ Releases bundle the runtime:
mix releasepackages the BEAM, the application, and its dependencies into one deployable - ✅ Nerves keeps the same model on embedded devices: The build produces a firmware image, and the runtime model is unchanged
- ⚠️ The runtime is not a native binary: A release carries the VM, so the artefact is larger than a compiled C program
1.1.7 Trade-offs (not coupling)
- Dynamic typing is a deliberate trade: It buys the flexibility of pattern matching and hot code loading at the cost of static checking
- Ruby-like syntax is a familiarity choice: It lowers the barrier for developers from a scripting background
- LiveView keeps the UI state on the server: This is a deliberate architectural choice that removes client JavaScript, not a language mechanism
- Nerves adds an embedded build layer: The added layer is scope, not coupling
- Macros are a metaprogramming power: A macro rewrites code at compile time, and that power carries the usual hygiene discipline
- The BEAM is a virtual machine, not an operating system: The runtime boundary is scope, not a coupling defect
1.2 Ecosystem coupling
1.2.1 Performance
- ✅ The BEAM is a mature bytecode VM with a JIT: BeamAsm, added in OTP 24, compiles hot code, so bytecode is not always interpreted
- ✅ Excellent for I/O-bound workloads: Hundreds of thousands of processes can wait on I/O without one thread each
- ✅ Per-process collection avoids global pauses: A collection affects one process, not the whole system
- ✅ Reduction-based scheduling keeps latency even: No process starves another for long
- ⚠️ Weaker for CPU-bound computation: The BEAM trails native-compiled languages on a tight numeric loop
- ⚠️ A NIF runs on a scheduler thread: A long-running native function can block other processes on the same scheduler
1.2.2 Ecosystem
- ✅ Hex.pm is a mature registry and
mixis the build tool: Dependency resolution, build tasks, and release packaging come from one toolchain - ✅ Phoenix, Ecto, and LiveView cover web applications end to end: Routing, database access, and server-rendered UI are provided by one family
- ✅ Erlang libraries are usable through interop: The OTP libraries arrive with the runtime
- ✅ Livebook gives executable notebooks: Interactive exploration and live documentation are part of the ecosystem
- ❌ The ecosystem is a monoculture around Phoenix and OTP: One framework family dominates, so alternatives are few (Ec6)
- ⚠️ The library count is smaller than the JVM or npm: Fewer general-purpose packages exist
- ✅ The NIF ABI is versioned and checked at load on the BEAM runtime it runs on [5] (Ec8)
- ✅ Stored terms cross on the BEAM promise: Elixir encodes terms in the external term format, and the format’s version rule is published — systems as of R16B decode the current default encoding [6] (Ec9)
1.2.3 Evolution
- ✅
mix.exspins an Elixir requirement: A project states the version range it needs, andmixenforces it - ✅ The BEAM is stable across decades: Code written years ago continues to run
- ✅ Deprecations warn before removal: The compiler emits a deprecation warning ahead of a change
- ✅
mix formatsettles style across the ecosystem: One formatter removes style drift - ⚠️ A hot upgrade needs a state migration callback:
code_change/3must convert old state to the new shape, so an upgrade is a design task - ❌ Build variants multiply: an if in a module body evaluates at compile time, so only the taken branch becomes code, and its condition comes from the build configuration (V7)
1.2.4 Domain
- ✅ Excellent fit for real-time web: Phoenix Channels push over WebSockets, and LiveView renders on the server
- ✅ Excellent fit for distributed, fault-tolerant systems: OTP supervision and the distribution protocol cover process and node failure
- ✅ Nerves deploys to embedded devices: The same runtime runs on a device image
- ✅ Back-pressure pipelines are a supported domain:
GenStageandBroadwaybuild pipeline stages over processes - ⚠️ Not aimed at CPU-bound numerics: The BEAM is not designed for tight numerical loops
1.2.5 Learning
- ✅ Ruby-like syntax lowers the barrier: Developers from Ruby or another scripting language recognise the form
- ✅ The documentation culture is excellent: HexDocs, guides, and doctests sit with the code
- ✅ The community is welcoming and growing: Questions are answered and the ecosystem keeps expanding
- ⚠️ The surface is large: The language, the OTP behaviours, macros, and the process model must all be learned (L2)
- ⚠️ Macros and
quote/unquoteare hard: Metaprogramming is powerful and easy to misuse
1.2.6 Syntax
- ✅ Ruby-inspired syntax is readable: The
do/endblock form and the keyword style read naturally - ✅ The pipe operator reads as data flow:
|>threads a value through a chain of calls - ✅ Pattern matching replaces nested conditionals: A multi-clause function is a case analysis
- ✅ Structs and maps have literal syntax:
%User{name: "Ada"}and%{key: value}build data directly - ⚠️ Macros can hide the code they generate: A DSL built with macros is opaque without the expansion
- ⚠️ The pipe passes the first argument: An awkward argument order forces a wrapper function
1.2.7 Testing
- ✅ ExUnit ships with the language:
mix testruns the suite with structured assertions and tagged tests - ✅ Doctests run the examples in documentation: An
iex>example in@docis executed as a test - ✅ Property-based testing is available:
StreamDatagenerates inputs from a property - ✅
mix test --traceand coverage reporting are built in: Test order and line coverage are visible without extra tooling - ❌ Errors surface at run time: Dynamic typing defers a type mistake to the executed path (G3)
- ⚠️ Testing concurrent code needs process-aware assertions: A test must wait for a message or a process state, so timing is a factor
1.2.8 Security
- ✅ Immutable data removes a class of shared-state faults: No two processes share a mutable value
- ✅ Process isolation contains a fault: A crashed process does not corrupt another process’s heap
- ✅ Pattern matching makes an unexpected shape fail loudly: A bad message raises a
FunctionClauseErrorrather than corrupting state - ⚠️
String.to_atom/1on untrusted input can exhaust the atom table: Atoms are not collected, so untrusted conversion is a denial-of-service risk - ⚠️
Code.eval_string/1executes arbitrary code: Dynamic evaluation must be kept away from untrusted input - ⚠️ A NIF and a
Portreach unsafe code: Native code can break the BEAM’s safety guarantees
1.2.9 Delivery targets
What ships from a producer to a consumer, and whether the interface across a release boundary is promised. Ec8 is present when one compiled target crosses with no promise.
| Target | Ships as | Crosses a producer boundary | Cross-release promise |
|---|---|---|---|
| hex package source | source | no | A hex package ships source the consumer compiles to BEAM |
| NIF library | compiled | yes | yes — The NIF API version compiles into the library, and the runtime checks it at load [5] |
1.2.10 Stored data formats
What the toolchain stores that outlives the program, and what the vendor publishes about reading it across a release boundary. Ec9 is present when one row carries a break: the reading promise published as broken, the writing direction published as unreadable elsewhere, or a break the probe harness has reproduced.
| Stored format | Reading promise | Writing promise |
|---|---|---|
| External term format — stored BEAM terms | yes — Elixir terms are stored in the BEAM external term format, the same encoding Erlang documents for persistence: the version is carried in the encoding, and Erlang/OTP systems as of R16B decode the minor-version-2 encoding that is the default as of OTP 26.0 [6] | — |
1.3 Engineering readiness
1.3.1 Reproducibility
- ❌ Mix resolves dependency versions from Hex at build time unless the lockfile is committed. (Y1)
1.3.2 Supply chain
- ❌ Hex packages carry no signed provenance. (Y3)
- ❌ The Hex name space is flat. (Y4)
1.3.3 Observability
- ❌ No tracing standard exists in the language; telemetry is the convention, not the standard. (Y5)
1.3.4 Feedback
- ✅ The shell runs source with no build step. (Y7)
- ✅ IEx ships breakpoints and pry in the standard distribution. (Y13)
- ⚠️ Editor analysis rides the language server, not the distribution.
1.3.5 Interop
- ✅ NIFs and ports are the documented foreign surfaces; NIFs run in process. (Y9)
- ✅ The BEAM is the portable target; the artifact runs wherever Erlang/OTP runs. (Y10)
1.3.6 Governance
- ❌ Semantics rest on the BEAM: Elixir’s semantics are documented as the implementation’s behavior, and no published conformance suite exists (Y17)
1.4 Profile
Unscored, and kept separate from every score on purpose. The profile records what a mechanism price cannot express: what a running program costs, how well a coding model and an agent work in the language, and whether a safety-critical path exists.
1.4.1 Energy and cost
What this axis asks: what does a running program cost in energy and time?
1.4.2 AI and agent readiness
What this axis asks: how well does a coding model and an agent work in this language?
- ⚠️ Moderate training data: models write it competently, with measurable language-specific weakness [9].
1.4.3 Safety certification
What this axis asks: is there a certified or standards-qualified path to a safety-critical system?
- ⚠️ No certified or standards-qualified path for safety-critical systems.
1.5 Scoring detail
1.5.1 Core coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Type | T1 |
dynamic no static check | language | ✅ | −15 |
T2 |
weak static | language | — | 0 | |
T3 |
dynamic/duck dispatch | language | ✅ | −8 | |
T4 |
no sum types | language | ✅ | −4 | |
T5 |
no generics | language | ✅ | −4 | |
T6 |
no namespaces | language | — | 0 | |
T7 |
type erasure/reflection | language | — | 0 | |
T8 |
operator overloading | language | — | 0 | |
T9 |
inheritance required for polymorphism | language | — | 0 | |
T10 |
no null-safety | language | — | 0 | |
T11 |
no module boundary | language | — | 0 | |
T12 |
no effect tracking | language | ✅ | −8 | |
T13 |
async/sync colouring | language | — | 0 | |
T14 |
unchecked foreign boundary | language | ✅ | −4 | |
T15 |
chars are encoding units | language | — | 0 | |
| Type cost | −12.3 (−43) | ||||
| Construction | C1 |
global mutable state by default | language | — | 0 |
C2 |
no immutability by default | language | — | 0 | |
C3 |
constructors coupled to allocation | language | — | 0 | |
C4 |
no constructor/validation | language | — | 0 | |
C5 |
unpinned collection order | language | — | 0 | |
C6 |
aliasing by default | language | — | 0 | |
C7 |
undeclared control transfer | language | — | 0 | |
C8 |
no source-visible init order | language | — | 0 | |
| Construction cost | 0 | ||||
| Memory | M1 |
manual deallocation | runtime | — | 0 |
M2 |
GC non-deterministic pauses | runtime | ✅ | −8 | |
M3 |
no RAII | language | — | 0 | |
M4 |
no ownership model | language | — | 0 | |
M5 |
uninitialized reads | language | — | 0 | |
M6 |
unchecked reinterpretation | language | — | 0 | |
Er6 |
uncatchable runtime fault | language | ✅ | −8 | |
M7 |
reference cycles leak | runtime | — | 0 | |
| Memory cost | −4.6 (−16) | ||||
| Error | Er1 |
no structured path | language | — | 0 |
Er2 |
unchecked exceptions only | language | ✅ | −8 | |
Er3 |
errors ignored/non-exhaustive | language | — | 0 | |
Er4 |
no composable result type | language | — | 0 | |
Er5 |
no isolation unit for a fault | runtime | — | 0 | |
| Error cost | −2.3 (−8) | ||||
| Concurrency | K1 |
GIL/no parallel | runtime | — | 0 |
K2 |
shared mutable state default | language | — | 0 | |
K3 |
manual sync no race detection | runtime | — | 0 | |
K4 |
no structured concurrency | language | ✅ | −4 | |
K5 |
no primitives | language | — | 0 | |
K6 |
thread-per-task cost | runtime | — | 0 | |
| Concurrency cost | −1.1 (−4) | ||||
| Platform | P1 |
cannot function outside one vendor/domain | context | — | 0 |
P2 |
single-vendor but other uses | context | — | 0 | |
P3 |
legacy/discontinued platform | context | — | 0 | |
P4 |
poor domain fit | context | — | 0 | |
| Platform cost | 0 |
Core coupling score: 79.7/100 — 71 of the 350 inventory points are present, so the axis cost is 100 × 71 ÷ 350 = 20.3 and the score is 100 − 20.3. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.2 Ecosystem coupling Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Performance | R1 |
interpreted no AOT/JIT | runtime | — | 0 |
R2 |
GC pauses | runtime | — | 0 | |
R3 |
JIT warmup | runtime | — | 0 | |
| Performance cost | 0 | ||||
| Ecosystem | Ec1 |
no package manager | context | — | 0 |
Ec2 |
fragmented tooling | context | — | 0 | |
Ec3 |
small/niche/discontinued | context | — | 0 | |
Ec4 |
proprietary | context | — | 0 | |
Ec5 |
platform-locked tooling | context | — | 0 | |
Ec6 |
monoculture | context | ✅ | −8 | |
Ec7 |
legacy burden | context | — | 0 | |
Ec8 |
unpromised binary boundary | context | — | 0 | |
Ec9 |
unpromised data boundary | context | — | 0 | |
| Ecosystem cost | −3.1 (−8) | ||||
| Evolution | V1 |
breaking changes | language | — | 0 |
V2 |
frozen | context | — | 0 | |
V3 |
discontinued | context | — | 0 | |
V4 |
glacial standards | context | — | 0 | |
V5 |
silent default drift | runtime | — | 0 | |
V7 |
build-variant state space | context | ✅ | −8 | |
| Evolution cost | −3.1 (−8) | ||||
| Domain | D1 |
domain/vendor lock-in | context | — | 0 |
D3 |
framework forces architecture | context | — | 0 | |
| Domain cost | 0 | ||||
| Learning | L1 |
steep | context | — | 0 |
L2 |
large surface/multi-paradigm | context | ✅ | −4 | |
L3 |
sparse docs | context | — | 0 | |
| Learning cost | −1.6 (−4) | ||||
| Syntax | S1 |
verbose | language | — | 0 |
S2 |
inconsistent | language | — | 0 | |
S3 |
punctuation-heavy | language | — | 0 | |
| Syntax cost | 0 | ||||
| Testing | G1 |
weak tooling | context | — | 0 |
G2 |
poor debugging | context | — | 0 | |
G3 |
runtime-only errors | context | ✅ | −4 | |
G4 |
no published monotonic clock | runtime | — | 0 | |
| Testing cost | −1.6 (−4) | ||||
| Security | Q1 |
memory-unsafe | language | — | 0 |
Q2 |
dynamic/weak typing risk | language | — | 0 | |
Q3 |
known vulnerability/injection | context | — | 0 | |
Q4 |
silent integer overflow | language | — | 0 | |
| Security cost | 0 |
Ecosystem coupling score: 90.6/100 — 24 of the 256 inventory points are present, so the axis cost is 100 × 24 ÷ 256 = 9.4 and the score is 100 − 9.4. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
1.5.3 Engineering readiness Dimensions
| Dimension | Mechanism | Description | Imposed by | Present | Weight |
|---|---|---|---|---|---|
| Reproducibility | Y1 |
build not reproducible | context | ✅ | −15 |
Y2 |
dependencies not pinned | context | — | 0 | |
Y14 |
no toolchain version pin | context | — | 0 | |
Y18 |
no machine-read project contract | context | — | 0 | |
| Reproducibility cost | −8.8 (−15) | ||||
| Supply chain | Y3 |
no signed provenance | context | ✅ | −15 |
Y4 |
registry without namespacing | context | ✅ | −4 | |
Y16 |
no advisory feed | context | — | 0 | |
| Supply chain cost | −11.1 (−19) | ||||
| Observability | Y5 |
no stable tracing standard | context | ✅ | −8 |
Y6 |
no structured logging | context | — | 0 | |
Y15 |
no post-mortem diagnostics | runtime | — | 0 | |
| Observability cost | −4.7 (−8) | ||||
| Feedback | Y7 |
slow build | context | — | 0 |
Y8 |
no fast in-editor analysis | context | — | 0 | |
Y13 |
no bundled debugger | context | — | 0 | |
| Feedback cost | 0 | ||||
| Interop | Y9 |
no foreign-function interface | language | — | 0 |
Y10 |
no portable target | context | — | 0 | |
| Interop cost | 0 | ||||
| Governance | Y11 |
single-vendor governance | context | — | 0 |
Y12 |
closed specification | context | — | 0 | |
Y17 |
no conformance mechanism | context | ✅ | −8 | |
Y19 |
no published parser | context | — | 0 | |
| Governance cost | −4.7 (−8) |
Engineering readiness score: 70.8/100 — 50 of the 171 inventory points are present, so the axis cost is 100 × 50 ÷ 171 = 29.2 and the score is 100 − 29.2. Each dimension’s cost above is its share of the same denominator, and the raw weight sum follows in parentheses.
Verdict: Elixir’s design yields moderate language-imposed coupling. Immutable terms, the process model, and OTP supervision remove shared-memory races, turn failure into a supervision event, and keep state inside a process instead of in shared objects. Main strengths: the pipe operator and pattern matching decouple data flow and case analysis, the BEAM supports code loading without stopping the system, and the runtime is proven by decades of fault-tolerant operation. Main weaknesses: the language is dynamically typed, so a type fault surfaces at run time; exceptions are unchecked; collection is non-deterministic; and the ecosystem is a monoculture around Phoenix and OTP.
The formal development. The definitions, theorems, and proofs behind this page are published in:
- On the Nature of Coupling: All Coupling as Shared Resource Access — Zenodo, 2026 — doi:10.5281/zenodo.21925122
- Coupling as a Consequence of Cohesion: Decomposition, the Coupling Floor, and Domain-Imposed Coupling — Zenodo, 2026 — doi:10.5281/zenodo.21925201
- On the Nature of Cohesion: Cohesion as Correctness Relative to a Partitioning Rule — Zenodo, 2026 — doi:10.5281/zenodo.21703193