Gleam is a type-safe and extensible programming language for the Erlang virtual machine and the JavaScript runtime.
The recently released version 0.23 adds new features, as well as other optimizations.
Gleam runs on the Erlang virtual machine with a variety of other great programming languages, so the development team wants to take advantage of all the packages written in those languages.
Projects that previously used the Gleam build tool may depend on packages written in Gleam or Erlang. Starting with this release, projects written in Elixir are also supported, giving Gleam programmers access to almost all packages found on Hex, the Erlang ecosystem’s package manager.
The developer experience with Elixir packages in Gleam is the same as with Erlang packages.
# Add an Elixir package to the Gleam project
$ gleam add tzdata
// Import a function from the package
external fn tzdata_version() -> String =
"Elixir.Tzdata" "tzdata_version"
// Use it in Gleam
pub fn main() {
io.println(tzdata_version())
}
- Optimizations for package upgrades
Development teams want to make it as easy as possible to use code written by others, and want to avoid “dependency hell”, so the user experience of building tools is an important area for Gleam.
A missing piece of the puzzle so far has been upgrading the package versions that the project depends on – previously it was a largely manual process.
In this release, there is a newgleam update
The command will efficiently resolve the latest compatible version of dependencies using the PubGrub algorithm.
$ gleam update
# Tada, you're on the latest versions!
Gleam generates documentation for packages and publishes HTML to HexDocs, the Erlang ecosystem’s documentation site.
In this release, the generated documentation includes a search bar, so it’s easier and faster than ever to find functions, types, and modules. The search is powered by the Lunr JavaScript library, so fuzzy matching is supported to help with spelling mistakes, or if you don’t quite remember the name you need to query.
See the release announcement for details.
#Gleam #v023 #released #functional #programming #language #written #Rust #News Fast Delivery