Gleam 1.10 Brings Major Compiler Enhancements and Faster JavaScript Performance
Gleam 1.10, the latest update to the type-safe language designed for the Erlang virtual machine and JavaScript environments, has been officially released. This version introduces significant improvements to the compiler’s internal data handling and analysis capabilities, alongside optimizations that boost the speed of generated JavaScript code. The release was announced on April 14 and is now available on GitHub for developers to explore.
One of the standout features of Gleam 1.10 is the compiler’s enhanced ability to retain detailed information about types and values within programs, as explained by Gleam’s creator Louis Pilfold. This richer metadata powers the language server, enabling new developer conveniences like a “find references” tool that tracks where specific types or values are used across an entire project. Moreover, the improved metadata allows renaming features to extend beyond module boundaries, letting developers rename types and values globally throughout their codebase, which was previously limited to local scopes. The compiler also received fixes to more accurately detect unused code, addressing prior blind spots in its analysis.
Another key advancement is the improved exhaustiveness analysis, particularly around string pattern matching. Earlier Gleam versions performed only basic checks on string cases, sometimes missing unreachable or redundant branches. With this update, the compiler can more precisely verify that all possible string variants are handled and flag unnecessary conditions, helping developers write safer and cleaner code. The compiler also warns when redundant assertions are made using let assert
on values whose variants are already known, reducing potential confusion and errors.
Finally, Gleam 1.10 enhances its fault tolerance by refining how it analyzes operators like +
and ==
. Even when the compiler encounters errors in code, it continues processing and reporting issues without stopping abruptly. This release ensures that both sides of binary operators receive thorough checking, which improves the accuracy of error messages and the responsiveness of the language server. Altogether, these updates make Gleam’s tooling more powerful, user-friendly, and robust for everyday programming tasks.