Gleam v0.23 released!
source link: https://gleam.run/news/gleam-v0.23-released/
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v0.23.0 has been released, let’s take a look at what’s new.
Elixir support
Gleam runs on the Erlang virtual machine alongside an assortment of other excellent languages, and as such we want to take advantage of all the packages written in those languages.
Previously projects using Gleam’s build tool could depend on packages written in Gleam or Erlang. With this release projects written in Elixir are also supported, giving Gleam programmers access to practically all the packages found on Hex, the package manager for the Erlang ecosystem.
The developer-experience for using Elixir packages in Gleam is the same as using 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())
}
Thank you to Tynan Beatty for this feature, and thank you to the Elixir community for all they give to the BEAM ecosystem!
Package updating
We want it to be as easy as possible to use code written by others, and we want to avoid “dependency hell”, so the user experience of the build tool is an important area for Gleam.
One missing part of the puzzle so far as been upgrading the package versions that your project depends on. It has largely been a manual process previously.
With this release there is a new gleam update
command which will efficiently
resolve the latest compatible versions for dependencies using the
PubGrub algorithm.
$ gleam update
# Tada, you're on the latest versions!
Searchable documentation
Gleam generates documentation for packages and publishes the HTML to HexDocs, the documentation site for the Erlang ecosystem.
With this release generated documentation includes a search bar so that functions, types, and modules can be found faster than easier than ever. The search is powered by the Lunr JavaScript library and as such supports fuzz-matching to help with typos, or for when you can’t quite remember the name of what you’re after.
Give the documentation search a try with the standard library documentation today.
Thank you to Lucas de Ávila Martins for this feature!
And more
Those are the main features, but there’s also an assortment of other changes:
- Constant expressions can now contain and reference functions. Thank you Eddie Hatfield!
- Compiler performance has been improved by buffering outputs and lazily loading resources. In tests this quadrupled performance when compiling the standard library.
- The LSP will now provide rudimentary autocompletion for importable modules.
- The code formatter style has been improved.
- The
gleam publish
command will include thepriv
directory (for non-code package artefacts) and can be run non-interactively. Thank you Tynan Beatty!
How can I try it?
Instructions on how to install the latest version of Gleam can be found on the getting started page of the website. Once installed check out the language tour for an introduction to the language.
Supporting Gleam
If you would like to support me in making Gleam please consider sponsoring Gleam or asking your employer to sponsor Gleam. Every donation makes a difference, no matter how small, so thank you for your help.
Or alternatively give us a star on GitHub! ⭐
And thank you!
Gleam is made possible by the support of all the people who have sponsored and contributed to the project. Thank you all!
Thanks for reading! Happy hacking! 💜
Recommend
-
48
Gleam has reached v0.3! Let’s take a look at some of the new features introduced since v0.1. Module namespaces Modules can now be namespaced, allowing use o...
-
27
Gleam has reached v0.4! This version has some new features, bug fixes, and some breaking changes. Let’s take a look. Structs Gleam’s map and tuple type has...
-
18
Gleam has reached v0.5! It’s quite a bit larger than any of the previous releases, so let’s take a look. Labelled arguments When functions take severa...
-
26
It has been two months since the last one, so now it’s time for another Gleam release! Let’s see what’s new this time: Improved error messages Since the last release we’ve put a lot of work into the error...
-
18
Thanks to all our new contributors Gleam’s development is faster than ever and it’s time for another release! Let’s take a look. Improved error handling The main way that errors are represented and handle...
-
12
1 month and 10,910 lines of code later it is time for another Gleam release! Let’s see what’s new this time. Module constants Sometimes we want to use a certain fixed value in multiple places in our proje...
-
3
Gleam is a type safe and scalable language for the Erlang virtual machine, and today v0.15.0 has been released! Let’s take a look at some of the highlights. More...
-
4
Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v0.17.0 has been released! Let’s take a look at some of the...
-
1
Gleam v0.18 released! 6th December 2021 Gleam is a type safe and scalable language for the Erlang virtual machine (and JavaScript). Today Gleam
-
12
Gleam is a type safe and scalable language for the Erlang virtual machine and JavaScript runtimes. Today Gleam v0.22.0 has been released, let’s take a look at w...
About Joyk
Aggregate valuable and interesting links.
Joyk means Joy of geeK