Gleam Generics: Compile-Time Safety Without Runtime Type Checks
How parametric polymorphism in Gleam lets you write reusable, type-safe code on the BEAM, with a worked Stack example and practical interop notes.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
How parametric polymorphism in Gleam lets you write reusable, type-safe code on the BEAM, with a worked Stack example and practical interop notes.
Gleam's Result type replaces exceptions with compile-time-enforced Ok/Err handling. This post shows how pipeline operators compose failures safely, where JavaScript interop breaks the guarantee, and how to verify the compiler actually catches missing branches.
Gleam pairs static types and immutable data with BEAM process isolation. This architecture note covers a minimal actor design, Erlang trust boundaries, and operational checks for fault-tolerant services.
Learn how Gleam's FFI interacts with the BEAM, the risks of the trust boundary between static and dynamic types, and how to verify external function signatures using Dialyzer.
Erlang's async message passing relies on per-process mailboxes managed by the BEAM VM. Understand selective receive, unbounded mailbox risks, and practical diagnostics.
Build a small Gleam module that models a missing value with Option, run it, and confirm the compiler rejects a match that forgets None.
Learn how to implement fault-tolerant state management in Gleam using GenServers and Supervisors via the gleam_otp library to build resilient BEAM applications.
Gleam has no exceptions, so fallible code can turn into a staircase of case expressions. The `use` expression flattens it — here's how the sugar works, with a result.try pipeline and its trade-offs.
Learn how to use Elixir ETS (Erlang Term Storage) to reduce database load by caching transient state in-memory with O(1) lookup performance.