Gleam (programming language)
| Gleam | |
|---|---|
Lucy, the starfish mascot for Gleam[1] | |
| Paradigm | Multi-paradigm: functional, concurrent[2] |
| Designed by | Louis Pilfold |
| Developer | Louis Pilfold |
| First appeared | June 13, 2016 |
| Stable release | 1.17.0[3] |
| Typing discipline | Type-safe, static, inferred[2] |
| Memory management | Garbage collected |
| Implementation language | Rust |
| OS | FreeBSD, Linux, macOS, OpenBSD, Windows[4] |
| License | Apache License 2.0[5] |
| Filename extensions | .gleam |
| Website | gleam |
| 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
Gleam was originally created in 2016 by Louis Pilfold for a conference talk. It was later redesigned and adapted into what it is today.[6]
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
Gleam has seen some adoption in recent years.[17] According to a blog post, the language creators have placed strong emphasis on developer experience (DX), which has contributed to its appeal.[18][better source needed]
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.[19] In 2025, Louis Pilfold reported on results from the 2024 developer survey, which received 841 responses.[19] Pilfold concluded that Gleam developers "overwhelmingly come from other ecosystems other than Erlang and Elixir".[19] The core team also reported on Gleam's efforts to expand the BEAM ecosystem in a keynote talk at Code BEAM Europe 2024.[20]
Developers have cited Gleam’s simplicity, static typing, and user-friendly tooling as reasons for adoption.[21] The developer behind Nestful described their motivations for rewriting the project in Gleam as driven by its clarity and ease of use.[22] There is a community-maintained list of companies using Gleam in production.[23]
In 2025, Gleam appeared for the first time in the Stack Overflow Developer Survey, where it was the 2nd "most admired" language, with 70% of users currently using the language wanting to continue working with it.[17] 1.1% of developer respondents reported doing "extensive development work" in the language over the past year.[17]
Features
Gleam includes the following features.[8][24]
- Result type for error handling
- Immutable objects
- Algebraic data types
- Pattern matching
- No null pointers
- No implicit type conversions
Example
A "Hello, World!" example:
import gleam/io
pub fn main() {
io.println("hello, world!")
}
Gleam supports tail call optimization:[25]
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
Gleam's toolchain is implemented in the Rust programming language.[26] The toolchain is a single native binary executable which contains the compiler, build tool, package manager, source code formatter, and language server.[citation needed] A WebAssembly binary containing the Gleam compiler is also available, enabling Gleam code to be compiled within a web browser.[27] This is used in Gleam's interactive language tour[28] and online playground.[29]
References
- ^ "gleam-lang/gleam Issues – New logo and mascot #2551". GitHub.
- ^ a b c "Gleam Homepage". 2024.
- ^ "Release 1.17.0". June 2, 2026. Retrieved June 3, 2026.
- ^ "Installing Gleam". 2024.
- ^ "Gleam License File". GitHub. December 5, 2021.
- ^ a b Pilfold, Louis (February 7, 2024). "Gleam: Past, Present, Future!". Fosdem 2024 – via YouTube.
- ^ Krill, Paul (March 5, 2024). "Gleam language available in first stable release". InfoWorld. Retrieved March 26, 2024.
- ^ a b Eastman, David (June 22, 2024). "Introduction to Gleam, a New Functional Programming Language". The New Stack. Retrieved July 29, 2024.
- ^ De Simone, Sergio (March 16, 2024). "Erlang-Runtime Statically-Typed Functional Language Gleam Reaches 1.0". InfoQ. Retrieved March 26, 2024.
- ^ Getting to know Actors in Gleam – Raúl Chouza. Code BEAM America. March 27, 2024. Retrieved May 6, 2024 – via YouTube.
- ^ "Introducing the Gleam package index – Gleam". gleam.run. Retrieved May 7, 2024.
- ^ "Hello, Gleam! – Gleam". gleam.run. Retrieved May 6, 2024.
- ^ "v0.16 – Gleam compiles to JavaScript! – Gleam". gleam.run. Retrieved May 7, 2024.
- ^ Alistair, Woodman (December 2023). "Erlang Ecosystem Foundation Annual General Meeting 2023 Chair's Report".
- ^ "Gleam version 1 – Gleam". gleam.run. Retrieved May 7, 2024.
- ^ "Thoughtworks Technology Radar, Gleam". 2025.
- ^ a b c "Technology | 2025 Stack Overflow Developer Survey". survey.stackoverflow.co. Retrieved August 9, 2025.
- ^ Why Gleam Is Good
- ^ a b c Pilfold, Louis. "Developer Survey 2024 Results". gleam.run. Retrieved August 9, 2025.
- ^ Code Sync (October 28, 2024). Keynote: Gleam's Journey on the BEAM - Hayleigh Thompson & Louis Pilfold | Code BEAM Europe 2024. Retrieved August 9, 2025 – via YouTube.
- ^ Lingris, Alex (November 25, 2025). "We Rewrote Our Startup from PHP to Gleam in 3 Weeks". www.radical-elements.com. Retrieved December 16, 2025.
- ^ Nestful. "Why I Rewrote Nestful in Gleam". blog.nestful.app. Retrieved August 9, 2025.
- ^ Harris-Holt, Isaac (July 31, 2025), isaacharrisholt/gleam-in-production, retrieved August 9, 2025
- ^ Sharma, Gaurav (June 25, 2024). "Meet GLEAM: A new programming language for developers".
- ^ "Tail Calls". The Gleam Language Tour. Retrieved March 26, 2024.
- ^ "gleam-lang/gleam". Gleam. May 6, 2024. Retrieved May 6, 2024.
- ^ "Gleam's new interactive language tour | Gleam programming language". gleam.run. Retrieved December 16, 2025.
- ^ "Welcome to the Gleam language tour! 💫 - The Gleam Language Tour". tour.gleam.run. Retrieved December 16, 2025.
- ^ "The Gleam Playground". playground.gleam.run. Retrieved December 16, 2025.
External links
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.