Gleam (programming language)

Gleam
Lucy, the starfish mascot for Gleam[1]
ParadigmMulti-paradigm: functional, concurrent[2]
Designed byLouis Pilfold
DeveloperLouis Pilfold
First appearedJune 13, 2016; 9 years ago (2016-06-13)
Stable release
1.11.1[3] Edit this on Wikidata / 5 June 2025
Typing disciplineType-safe, static, inferred[2]
Memory managementGarbage collected
Implementation languageRust
OSFreeBSD, Linux, macOS, OpenBSD, Windows[4]
LicenseApache License 2.0[5]
Filename extensions.gleam
Websitegleam.run
Influenced by
[6]

Gleam is a general-purpose, concurrent, functional high-level programming language that compiles to Erlang or JavaScript source code.[2][7][8]

Gleam is a statically-typed language,[9] which is different from the most popular languages that run on Erlang’s virtual machine BEAM, Erlang and Elixir. Gleam has its own type-safe implementation of OTP, Erlang's actor framework.[10] Packages are provided using the Hex package manager, and an index for finding packages written for Gleam is available.[11]

History

[edit]

The first numbered version of Gleam was released on April 15, 2019.[12] Compiling to JavaScript was introduced with version v0.16.[13]

In 2023 the Erlang Ecosystem Foundation funded the creation of a course for learning Gleam on the learning platform Exercism.[14]

Version v1.0.0 was released on March 4, 2024.[15]

In April 2025, Thoughtworks added Gleam to its Technology Radar in the Assess ring (languages & frameworks worth exploring). [16]

Adoption

[edit]

Gleam has seen growing adoption in recent years, supported by an active and enthusiastic community. The language creators have placed strong emphasis on developer experience (DX), which has contributed to its appeal among functional programming enthusiasts and newcomers alike [17].

Although it compiles to run on the BEAM virtual machine, most new Gleam users do not have a background in Erlang nor Elixir, two older BEAM languages. According to the 2024 Gleam Developer Survey[18] and core team insights as presented in "Gleam's journey on the BEAM" keynote talk[19], this trend suggests that Gleam is helping to expand the BEAM ecosystem by attracting developers from other programming communities.

Developers frequently cite Gleam’s simplicity, static typing, and user-friendly tooling as key reasons for adoption. Companies using Gleam in production environments highlight its strong developer ergonomics and maintainability. For example, the team behind Nestful described their motivations for rewriting the project in Gleam as driven by its clarity and ease of use.[20] A community-maintained list of companies using Gleam in production[21] further reflects its growing presence in real-world applications.

In 2025, Gleam also appeared for the first time in the Stack Overflow Developer Survey[22], indicating increasing visibility in the broader software development landscape.

Features

[edit]

Gleam includes the following features, many common to other functional programming languages:[8]

Example

[edit]

A "Hello, World!" example:

import gleam/io

pub fn main() {
  io.println("hello, world!")
}

Gleam supports tail call optimization:[23]

pub fn factorial(x: Int) -> Int {
  // The public function calls the private tail recursive function
  factorial_loop(x, 1)
}

fn factorial_loop(x: Int, accumulator: Int) -> Int {
  case x {
    1 -> accumulator

    // The last thing this function does is call itself
    _ -> factorial_loop(x - 1, accumulator * x)
  }
}

Implementation

[edit]

Gleam's toolchain is implemented in the Rust programming language.[24] The toolchain is a single native binary executable which contains the compiler, build tool, package manager, source code formatter, and language server. A WebAssembly binary containing the Gleam compiler is also available, enabling Gleam code to be compiled within a web browser.

References

[edit]
  1. ^ "gleam-lang/gleam Issues – New logo and mascot #2551". GitHub.
  2. ^ a b c "Gleam Homepage". 2024.
  3. ^ "Release 1.11.1". June 5, 2025. Retrieved June 7, 2025.
  4. ^ "Installing Gleam". 2024.
  5. ^ "Gleam License File". GitHub. December 5, 2021.
  6. ^ Pilfold, Louis (February 7, 2024). "Gleam: Past, Present, Future!". Fosdem 2024 – via YouTube.
  7. ^ Krill, Paul (March 5, 2024). "Gleam language available in first stable release". InfoWorld. Retrieved March 26, 2024.
  8. ^ a b Eastman, David (June 22, 2024). "Introduction to Gleam, a New Functional Programming Language". The New Stack. Retrieved July 29, 2024.
  9. ^ De Simone, Sergio (March 16, 2024). "Erlang-Runtime Statically-Typed Functional Language Gleam Reaches 1.0". InfoQ. Retrieved March 26, 2024.
  10. ^ Getting to know Actors in Gleam – Raúl Chouza. Code BEAM America. March 27, 2024. Retrieved May 6, 2024 – via YouTube.
  11. ^ "Introducing the Gleam package index – Gleam". gleam.run. Retrieved May 7, 2024.
  12. ^ "Hello, Gleam! – Gleam". gleam.run. Retrieved May 6, 2024.
  13. ^ "v0.16 – Gleam compiles to JavaScript! – Gleam". gleam.run. Retrieved May 7, 2024.
  14. ^ Alistair, Woodman (December 2023). "Erlang Ecosystem Foundation Annual General Meeting 2023 Chair's Report".
  15. ^ "Gleam version 1 – Gleam". gleam.run. Retrieved May 7, 2024.
  16. ^ "Thoughtworks Technology Radar, Gleam". 2025.
  17. ^ Why Gleam Is Good
  18. ^ Gleam Developer Survey 2024 Results – Gleam website
  19. ^ Gleam's Journey on the BEAM – YouTube
  20. ^ Why I Rewrote Nestful in Gleam – Nestful Blog
  21. ^ Gleam in Production – GitHub
  22. ^ Stack Overflow Developer Survey 2025
  23. ^ "Tail Calls". The Gleam Language Tour. Retrieved March 26, 2024.
  24. ^ "gleam-lang/gleam". Gleam. May 6, 2024. Retrieved May 6, 2024.
[edit]