Task.succeed is a pretty long name to write out. What if we called it Task.ok instead? :thinking:
Would that mean changing Task.fail to Task.err as well?
that would make sense to me, sure :thumbs_up:
now that we have ! I'd like to revisit this
we have the convention of always using ! at the end of branches, which I like!
e.g.
if foo then
Stdout.line! "blah"
else
Stdout.line! "something"
however, it looks strange to me to follow this convention with Task.ok and Task.err :sweat_smile:
e.g.
answer =
if foo then
Stdin.line!
else
Task.ok! "something"
Task.succeed! and Task.fail! feel more natural to me compared to Task.ok! and Task.err!
however, it looks strange to me to follow this convention with Task.ok and Task.err :sweat_smile:
e.g.
answer =
if foo then
Stdin.line!
else
Task.succeed! "something"
I'm curious what others think!
Task.ok doesn’t look strange to me here so my preference would be to keep it because it is shorter
They look pretty evenly strange to me.
But I am used to Ok(...) from all of the rust
Succeed makes more sense, but I really like that I don't have to parse Task.ok in my mind. It is so short that just glancing at it I know the meaning of that expression. Task.succeed is just long enaugh to not fall into this category. Besides that, I don't think Task.ok! ... seems strange.
Last updated: Jun 16 2026 at 16:19 UTC