Skip to content
Discussion options

You must be logged in to vote

Hello! Good question, thank you.

Result is to be used for operations that may not succeed, such as attempting to retrieve an entry from a data structure. Other languages use a mix of option and result for this scenario, but Gleam always uses result. This consistency means we have to do less converting between the two types and our special try syntax works with all fallible functions.

Later we will have better documentation for this, what we currently have is a bit basic while the core language and tooling is being worked on.

Replies: 3 comments 5 replies

Comment options

You must be logged in to vote
4 replies
@lpil
Comment options

lpil Sep 14, 2021
Maintainer

@edongashi
Comment options

@lpil
Comment options

lpil Sep 14, 2021
Maintainer

@edongashi
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by J3RN
Comment options

You must be logged in to vote
1 reply
@lpil
Comment options

lpil Sep 14, 2021
Maintainer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
4 participants