Gleam (programming language)
Gleam is a general-purpose, concurrent, functional, high-level programming language that compiles to Erlang or JavaScript source code.[src] Gleam is a statically-typed language, which is different from the most popular languages that run on Erlang’s virtual machine BEAM, Erlang and Elixir.[src] Gleam has its own type-safe implementation of OTP, Erlang's actor framework.[src] Packages are provided using the Hex package manager, and an index for finding packages written for Gleam is available.[src]
Gleam is a general-purpose, concurrent, functional, high-level programming language that compiles to Erlang or JavaScript source code.[src] Gleam is a statically-typed language, which is different from the most popular languages that run on Erlang’s virtual machine BEAM, Erlang and Elixir.[src] Gleam has its own type-safe implementation of OTP, Erlang's actor framework.[src] Packages are provided using the Hex package manager, and an index for finding packages written for Gleam is available.[src] import gleam/io pub fn main() { io.println("hello, world!") } Gleam supports tail call optimization: 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) } }[src]
9 sentences · 9 cited inline · 0 references stored
References
No reference rows published for this article.
Cite this article
MLA
"Gleam (programming language)." encyclopegia.org, 2026, https://encyclopegia.org/wiki/gleam-programming-language. Accessed 03 December 2026.
Chicago
"Gleam (programming language)." encyclopegia.org. Accessed December 3, 2026. https://encyclopegia.org/wiki/gleam-programming-language.
APA
encyclopegia.org. (2026). Gleam (programming language). Retrieved December 3, 2026, from https://encyclopegia.org/wiki/gleam-programming-language
Accessed December 3, 2026 · CC BY-SA 4.0 · citation page · JSON