Depending on the background for the beginner, perhaps we can question even the backpassing syntax.
I have a friend who's a c# expert and the first time I showed him the Roc syntax he saw the srr <- File.readUtf8 path |> Task.await and asked, "Why are the arrows going in different directions?"
I think most of us have a left to right mindset. So I just want to throw out there, that if we are going to add some sugar, perhaps we could consider inverting the <- arrow, so it becomes a bit more "natural"
For instance what about using =? which kind of conveys "this is an assignment, but not really guaranteed" ..
str =? File.readUtf8 path
{} =? Stdout.line "str was: \(str)"
File.writeUtf8 otherPath "\(str)!"
Yeah, I dislike the arrows in opposite directions as well, =? is a nice alternative. I wonder if we discussed something similar in the original backpassing syntax discussion.
2 messages were moved here from #ideas > |> Task.await syntax sugar? by Anton.
I wonder if we discussed something similar in the original backpassing syntax discussion.
From what I could find no alternatives to <- were proposed.
I really don't like anything with a = in it. This is not assignment. It is a function call. I think we should try to minimize confusing that (even if a new user may assume it is some special form of assignment).
Also for =? in general, feels more like the equivalent of .unwrap() or some form of try. So very different from the meaning of backpassing.
Personally, I have grown very use to <-, but I guess people may find it even stranger.
Good points
fwiw, isn't the intent of backpassing to take something abstract and that gets increasingly more complicated/nested with repetition instead appear flatter/simpler by mimicking, specifically, assignment?
The risk of mixing up assignment and parameter passing is fairly benign in this case because Roc doesn't really have assignment in the typical sense at all (it's more like defining a constant expression in most languages).
Also good points :)
Last updated: Jun 16 2026 at 16:19 UTC