Gleam Programming Language
github.com
1
Leaving SiteNav
External Link Disclaimer
You are about to visit github.com. This website is not operated by us. We are not responsible for its content or privacy practices.
About this website
Gleam is a free and open-source, statically typed functional programming language designed for building concurrent, fault-tolerant systems on the BEAM virtual machine (the runtime that powers Erlang and Elixir). Created by Louis Pilfold in 2018, Gleam brings strong static typing, similar to languages like Rust and TypeScript, to the BEAM ecosystem, which traditionally relied on dynamic typing. Key features: static typing: Gleam has a strong, modern type system with full type inference, meaning developers rarely need to write explicit type annotations. The compiler catches type errors at compile time, preventing entire classes of bugs before runtime. Algebraic data types: supports tagged unions (custom types with variants), records, and tuples. Pattern matching on these types is exhaustive (the compiler ensures all cases are handled). No null: Gleam uses the Result type (Ok/Error) for operations that can fail and Option types for optional values, eliminating null pointer exceptions common in other languages. Immutability: all data is immutable. Variables cannot be reassigned. This eliminates data races in concurrent code and makes programs easier to reason about. Concurrency: Gleam runs on BEAM, so it inherits Erlang's lightweight processes, message passing, and OTP supervision trees. Thousands of processes can run concurrently with minimal overhead. Interoperability: Gleam can call Erlang and Elixir code and vice versa. The Gleam ecosystem includes packages from the Erlang and Elixir communities. Compilation: compiles to Erlang source code, which is then compiled to BEAM bytecode. A JavaScript backend (WIP) targets the browser and Node.js. Package manager: the Hex package manager (shared with Elixir) and gleam CLI tool for project management, dependency resolution, and testing. Tooling: code formatter (gofmt-style), documentation generation, and built-in test runner. Apache-2.0.
Statistics
1
Views
0
Clicks
0
Like
0
Dislike