ArticleslgStudy

computer science

Gleam (programming language)

Gleam (programming language) is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Gleam (programming language) rather than just read about it. In short: Gleam is a general-purpose, concurrent, functional, high-level programming language that compiles to Erlang or JavaScript source code. 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.

Gleam (programming language) — main illustration
Gleam (programming language) — illustration

Key takeaways

  • Gleam (programming language) belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Gleam (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Gleam (programming language) from memory before moving on to harder problems.

Reference excerpt

Gleam is a general-purpose, concurrent, functional, high-level programming language that compiles to Erlang or JavaScript source code. 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. Gleam has its own type-safe implementation of OTP, Erlang's actor framework. Packages are provided using the Hex package manager, and an index for finding packages written for Gleam is available.

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. The first numbered version of Gleam was released on April 15, 2019. Compiling to JavaScript was introduced with version v0.16. In 2023 the Erlang Ecosystem Foundation funded the creation of a course for learning Gleam on the learning platform Exercism. Version v1.0.0 was released on March 4, 2024. In April 2025, Thoughtworks added Gleam to its Technology Radar in the Assess ring (languages & frameworks worth exploring).

Adoption Gleam has seen some adoption in recent years. According to a blog post, the language creators have placed strong emphasis on developer experience (DX), which has contributed to its appeal. 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. In 2025, Louis Pilfold reported on results from the 2024 developer survey, which received 841 responses. Pilfold concluded that Gleam developers "overwhelmingly come from other ecosystems other than Erlang and Elixir". The core team also reported on Gleam's efforts to expand the BEAM ecosystem in a keynote talk at Code BEAM Europe 2024. Developers have cited Gleam’s simplicity, static typing, and user-friendly tooling as reasons for adoption. The developer behind Nestful described their motivations for rewriting the project in Gleam as driven by its clarity and ease of use. There is a community-maintained list of companies using Gleam in production. 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. 1.1% of developer respondents reported doing "extensive development work" in the language over the past year.

Features

Gleam includes the following features.

Result type for error handling Immutable objects Algebraic data types Pattern matching No null pointers No implicit type conversions

Example A "Hello, World!" example:

Gleam supports tail call optimization:

Implementation Gleam's toolchain is implemented in the Rust programming language. 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. This is used in Gleam's interactive language tour and online playground.

References

External links Official website Gleam-lang on GitHub

Illustrations

Gleam (programming language) illustration

Worked examples

Example 1 — a first encounter with Gleam (programming language)

Start with the simplest possible case. Write down what Gleam (programming language) claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Gleam (programming language) before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Gleam (programming language) ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Gleam (programming language)

In research
Gleam (programming language) appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Gleam (programming language) in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Gleam (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Concurrent programming languages, Erlang (programming language), Free and open source compilers, so understanding it makes those chapters shorter.
In everyday life
Look for Gleam (programming language) outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Gleam (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Gleam (programming language) means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Gleam (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Gleam (programming language) in simple terms?

Gleam is a general-purpose, concurrent, functional, high-level programming language that compiles to Erlang or JavaScript source code. 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.

Why does Gleam (programming language) matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Gleam (programming language)?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Gleam (programming language).

Tags

  • Concurrent programming languages
  • Erlang (programming language)
  • Free and open source compilers
  • Free software projects
  • Functional languages
  • High-level programming languages
  • JavaScript
  • Multi-paradigm programming languages
  • Pattern matching programming languages
  • Programming languages
  • Programming languages created in 2016
  • Software using the Apache license

Keep exploring