
Gleam 1.14.0, a new version of the statically typed language for the Erlang VM and JavaScript runtimes, has enhanced support for external types.
Released December 25, the update can be accessed at GitHub. With this release, the @external annotation is now supported for external types, giving the programmer a way to specify an Erlang or TypeScript type definition to be used, according to Gleam creator Louis Pilfold. Gleam’s external type feature is used to declare an Erlang or JavaScript type that can be referenced in Gleam, but because the type originates from outside of Gleam, the Gleam compiler cannot produce a precise definition in generated Erlang or TypeScript type definitions. Instead, the compiler had to fall back to the correct but vague “any” type of each language.
Also enhanced in Gleam 1.14.0 is inference-based pruning, an optimization that improves performance and detects more redundant patterns when pattern matching on binary data. Gleam 1.14.0 extends this optimization to work with int segments, thus increasing its effectiveness.

