Eliminating Runtime Crashes with Gleam's Result Type
Learn how Gleam uses the Result type and the 'use' keyword to replace dangerous exceptions with compile-time safety and linear error handling.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Learn how Gleam uses the Result type and the 'use' keyword to replace dangerous exceptions with compile-time safety and linear error handling.
Gleam’s Result type turns potential exceptions into explicit values, letting the compiler enforce error handling and giving you a composable, pattern‑matchable way to manage failure.
Learn how Gleam’s @derive macro auto‑generates Inspect and Encoder implementations for public structs, why it’s a practical choice, and the limits to keep in mind.
Learn how to build resilient concurrent systems using Gleam's static type system and the BEAM's Actor model, focusing on supervisor patterns and data boundaries.
Gleam’s process API brings typed message passing and OTP supervision to the BEAM. Learn how to spawn safe processes, link them, and build a counter service that restarts on failure—all while catching message mismatches at compile time.
When using Gleam’s migration feature to alter a database schema—for example, adding a new column to an existing table—I need a reliable way to revert that change if the migration fails or produces unexpected results. The rollback must preserve existing data, be idempotent so it can be run multiple times, and ideally run inside a transaction that can be abort