---
title: "Using use in Gleam"
url: https://daily.dev/posts/using-use-in-gleam-jvaslbjkn
source_url: https://erikarow.land/notes/using-use-gleam
type: article
source: "Erika Rowland"
published: 2024-07-08T15:11:29.336Z
updated: 2024-10-05T18:59:34.428Z
tags: ["elixir", "functional-programming", "gleam"]
reading_time: 13
upvotes: 35
comments: 2
language: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Using use in Gleam

**[Erika Rowland](https://daily.dev/sources/erikarow)** · 13 min read · 35 upvotes · 2 comments

## Summary

Gleam's `use` expression simplifies handling callback functions, error management, and context management. Introduced in version 0.25, `use` replaces the need for extensive nested callbacks, making code more readable, especially when dealing with functions like `result.map` and `result.try` for error handling. It serves as syntactic sugar for creating cleaner and more maintainable code, similar to Rust's `?` operator.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://erikarow.land/notes/using-use-gleam>

## Community discussion

Top comments from developers on daily.dev.

**@sheikshahith** · 0 upvotes

> I going to save your article I will learn gleam so your article will be useful for me 😃

**@piyushkacha** · 0 upvotes

> Useful article 💜
>
> Please share your thoughts in the gleam dev community also:  https://dly.to/MRu2Tagc3tk

## Similar posts on daily.dev

- [Don’t just attend KubeCon \+ CloudNativeCon, Merge Forward your experience\!](https://daily.dev/posts/don-t-just-attend-kubecon-cloudnativecon-merge-forward-your-experience--l0rpp73x8) · CNCF · 0 upvotes · 0 comments
- [Announcing H2 2026 KCDs](https://daily.dev/posts/announcing-h2-2026-kcds-m96goajm1) · CNCF · 1 upvotes · 0 comments
- [Two months of Open Community Groups](https://daily.dev/posts/two-months-of-open-community-groups-asf52zhbs) · CNCF · 0 upvotes · 0 comments
- [CNCF Unveils Schedule for KubeCon \+ CloudNativeCon Europe 2026](https://daily.dev/posts/cncf-unveils-schedule-for-kubecon-cloudnativecon-europe-2026-ikhcoa5cb) · CNCF · 2 upvotes · 0 comments
- [CNCF Debuts KubeCon \+ CloudNativeCon Japan 2026 Schedule](https://daily.dev/posts/cncf-debuts-kubecon-cloudnativecon-japan-2026-schedule-xp5pyudub) · CNCF · 1 upvotes · 0 comments

---

Tags: [#elixir](https://daily.dev/tags/elixir), [#functional-programming](https://daily.dev/tags/functional-programming), [#gleam](https://daily.dev/tags/gleam)

[View this post on daily.dev](https://daily.dev/posts/using-use-in-gleam-jvaslbjkn)
