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's Result type and compiler-enforced exhaustiveness prevent runtime errors in production apps, with practical combinators and a worked example for robust error handling.
Learn how to enforce compile‑time error handling in a Gleam HTTP service with the Result type. The article covers design requirements, minimal implementation, trust boundaries, operational checks, and when to rethink the design.
A practical look at using Gleam's custom types and pattern matching to replace exceptions with compile‑time guarantees.
Learn how to implement type-safe concurrent actors in Gleam using gleam/otp, including state management, supervision strategies, and BEAM VM integration.
Use Gleam’s Result type and try expression to handle expected failures without exceptions or nested case blocks.
Gleam replaces thrown exceptions with a pure Result type and a try/catch syntax that pattern‑matches on Ok/Err. This blog walks through a file‑reading pipeline, shows the generated code, and discusses verbosity, bundle size, and JS interop trade‑offs.
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.