Elixir v1.20 released: now a gradually typed language
AIThis post was created with the assistance of artificial intelligence (AI).

TL;DR

AUDIBLE

Listen free for 30 days with Audible

Thousands of audiobooks and originals — cancel anytime.

Start your free trial

As an affiliate, we earn on qualifying purchases.

Elixir v1.20 has been released with a new type system that performs type inference and gradual type checking without requiring annotations. This allows the language to identify dead code and verified bugs efficiently, improving reliability while maintaining developer friendliness.

Elixir v1.20 has been released, introducing a gradually typed language that performs type inference and checks all programs without requiring type annotations, a significant development in the language’s evolution.

The new version completes a key milestone in Elixir’s type system project, which began with research efforts in 2022 and transitioned into development in mid-2023. The system uses set-theoretic types and includes a special dynamic() type, allowing it to verify bugs and dead code efficiently in existing programs.

Elixir’s type inference and checking are designed to be sound, developer-friendly, and compatible with existing dynamic code. Unlike many gradual type systems that rely on a generic ‘any()’ type, Elixir’s dynamic() type supports compatibility and narrowing properties, enabling it to refine types as code executes and report only verified bugs.

Why It Matters

This development matters because it enhances Elixir’s reliability by enabling static-like bug detection in a language traditionally dynamically typed, without adding developer overhead. It also demonstrates a successful integration of a set-theoretic, gradually typed system into an existing language, potentially influencing other dynamically typed languages to adopt similar approaches.

Amazon

Elixir programming books

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Background

Elixir, a language built on the Erlang VM, has historically been dynamically typed. The project to add set-theoretic types and gradual typing began in 2022, with a research paper published in June 2023 outlining the design. The goal was to improve code safety and bug detection without sacrificing the language’s flexibility or requiring explicit type annotations.

“With Elixir v1.20, we have completed our first development milestone: type inference and gradual type checking of all programs without annotations.”

— Elixir core team (unnamed)

“The dynamic() type allows Elixir to verify bugs efficiently while maintaining compatibility with existing code.”

— Elixir type system researcher

Amazon

Erlang VM development tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What Remains Unclear

It is not yet clear how widely adopted the new type system will be or how it will perform in large, complex codebases. The long-term impact on developer workflows and the potential need for annotations or adjustments remain to be seen. Additionally, detailed performance metrics beyond initial benchmarks are still emerging.

Amazon

programming language type inference tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

What’s Next

Next steps include broader adoption by the Elixir community, further performance testing, and potential refinements based on user feedback. Future releases may expand support for more advanced type features or optimize existing algorithms to handle larger codebases more efficiently.

Amazon

software debugging tools

As an affiliate, we earn on qualifying purchases.

As an affiliate, we earn on qualifying purchases.

Key Questions

What is the main feature introduced in Elixir v1.20?

Elixir v1.20 introduces a gradually typed system with type inference and type checking that works without requiring explicit type annotations, allowing for bug detection and dead code identification.

How does the dynamic() type differ from other gradual types?

The dynamic() type in Elixir supports compatibility and narrowing properties, enabling it to refine types as code executes and report only verified bugs, unlike the ‘any()’ type which discards type information.

Will developers need to add type annotations in their code?

No, the new system performs type inference and checks without requiring any annotations, preserving Elixir’s dynamic nature while enhancing safety.

What are the benefits of this update for Elixir developers?

Developers can now identify bugs and dead code more reliably without changing their coding style or adding annotations, improving code quality and maintainability.

Are there any limitations or known issues with the new type system?

It is still early to assess long-term limitations; performance in very large projects and integration with existing tooling are areas to watch as the system matures.

Source: Hacker News

NFL SEASON / TAI

NFL season / tailgating Picks

As an affiliate, we earn on qualifying purchases.

You May Also Like

DeepSeek-V4-Flash means LLM steering is interesting again

DeepSeek-V4-Flash enables local model steering, making manipulation of language models more practical and accessible for developers and researchers.

Building a web server in aarch64 assembly to give my life (a lack of) meaning

A developer creates a static HTTP server entirely in aarch64 assembly on macOS, exploring low-level system calls and server mechanics for personal understanding.

8 Best External Gpus In 2026

Thorsten Meyer AI has listed eight leading external GPUs for 2026, but the available material does not identify the selected products.

Linux devs are fighting the new age-gated internet

Open-source Linux developers oppose new age verification laws like Colorado’s SB26-051 and California’s AB 1043, citing privacy and principle concerns.