Stream: ideas

Topic: Error propagation with ?


view this post on Zulip Kesanov (Feb 26 2023 at 09:52):

Several languages use the ? operator to cut a lot of boilerplate in error handling.

Most notably rust: https://doc.rust-lang.org/rust-by-example/std/result/question_mark.html

Are there any plans to introduce same functionality into Roc?

view this post on Zulip Anton (Feb 26 2023 at 12:25):

We have "backpassing" for that, I recommend searching for that term in the tutorial :)

view this post on Zulip Kesanov (Feb 26 2023 at 21:11):

Backpassing is poor choice for error handling as it clashes with effect management, similar to monads.

view this post on Zulip Brendan Hansknecht (Feb 26 2023 at 21:32):

Can you be more specific in what you mean by it clashes with effect management?


Last updated: Jun 16 2026 at 16:19 UTC