Gleam 1.10 Boosts Compiler, Speeds JavaScript, and Adds New Features

Gleam 1.10, the latest version of the type-safe programming language designed for the Erlang VM and JavaScript runtimes, brings significant enhancements. Released on April 14 and accessible via GitHub, this update aims to improve exhaustive analysis, speed up JavaScript execution, and offer several new features enhancing the developer experience.

The compiler’s capabilities have seen major improvements, now retaining more information about types and values. This advancement allows the language server in the Gleam binary to introduce a “find references” feature, assisting developers in identifying usage throughout a project. Additionally, the “rename” feature now supports renaming across all project modules. The compiler’s ability to detect unused code has also been refined.

Enhancing the compiler’s exhaustiveness analysis, the update includes string pattern analysis, ensuring comprehensive handling of all value variants in flow control and eliminating redundant cases. The compiler now issues warnings when using “let assert” with already inferred variants.

Operator analysis has improved, ensuring both sides of operators like “+” and “==” are checked despite errors, leading to better language server information and more insightful error messages.

JavaScript code generation optimizations have reduced reliance on “immediately invoked function expressions,” resulting in faster execution. Developers benefit from improved handling of bit arrays and omitting the :float option when clear.

Additional enhancements include a new “gleam export package-information” command and bolstered security features with a software bill of materials (SBoM) and supply-chain levels for software artifacts (SLSA) provenance information in Gleam’s container images.

In summary, Gleam 1.10 introduces critical updates to the compiler, improving exhaustive analysis, error messages, and JavaScript execution. These advancements and new features underscore Gleam’s commitment to a robust and efficient programming environment for developers.

Subscribe to our weekly news digest.

Join now and become a part of our fast-growing community.

Invalid Email Address
Thanks for Subscribing!
We'll be sending you our best soon!
Something went wrong, please try again later