Stream: beginners

Topic: Is backpassing done for?


view this post on Zulip Karakatiza (Aug 25 2024 at 10:02):

Very sad if so. Not to repeat other threads, but this is a beautiful general-purpose tool to improve callback readability (in absence of true monads it is responsible for like a third of my initial interest in Roc). As a personal opinion I don't share the reasoning it is not needed because of specialized ! and ? operators, or it is hard to learn.

I haven't followed Zulip in a while and have only seen a few related threads, so just linking any relevant threads is appreciated.

view this post on Zulip Sam Mohr (Aug 25 2024 at 16:09):

Currently, backpassing has not been removed from the language, just added the deprecation warning for this reason. We'd like people to write code using either the other operators or normal callbacks and feel out how the resulting code looks.

Though you may not have a hard time with back passing, there are many people that have expressed difficulty with grokking the syntax between Roc and Gleam's use keyword. We want to optimize the trade-off between beginner friendliness and clean code, so if people are able to write code that's clean enough without backpassing, we'd rather make Roc accessible.

If it really makes code that much worse, we can just re-enable it.

view this post on Zulip rudolf (Aug 27 2024 at 09:03):

Do you want to make Roc friendly for people new to programming or for people switching languages? I think backpassing is mainly an issue for people switching languages, and for them, the exclamation mark won't help much since it has so many different uses in so many languages...

view this post on Zulip Anton (Aug 27 2024 at 09:34):

Do you want to make Roc friendly for people new to programming or for people switching languages?

We consider both when making decisions. My feeling is that backpassing could be the most difficult concept in Roc to truly grasp for those new to programming.

view this post on Zulip rudolf (Aug 27 2024 at 11:00):

The problem is that the only way to figure it out is through user studies...

I remember hearing on functional programming podcasts (not sure which one) that people new to programming pick up functional programming very easily. Much easier than imperative/OO programmers.

I'd say good documentation is more important than removing seemingly complicated features.

(P.S. the Tutorial is already very good documentation)

view this post on Zulip Anton (Aug 27 2024 at 12:05):

The problem is that the only way to figure it out is through user studies...

That is true, it seems like those would be hard to set up with our current resources.

We currently rely on user feedback through zulip, extensive discussion of changes like adding/deprecating backpassing and our own experiences using Roc. Can we improve this process without spending significant effort?

I'd say good documentation is more important than removing seemingly complicated features.

Good documentation is valuable. I also think we should try replacing complicated features with less complicated ones if these replacements can deliver. For example; it seems like an important reason for python's success is that is easy to get started with.

The decision on the removal of backpassing is not final, I recommend that anyone who wants to make their case opens a topic for discussion with 3 examples comparing both approaches side-by-side. We've found it helpful to discuss specific code when it comes to these things.

Sidenote: Richard is working on a proposal that could drastically simplify code compared to our current usage of !.

view this post on Zulip Richard Feldman (Aug 27 2024 at 12:15):

rudolf said:

I'd say good documentation is more important than removing seemingly complicated features.

in general I'd say the opposite: simplifying is more important than documenting complexity :big_smile:

view this post on Zulip Ostar (Aug 27 2024 at 13:52):

Btw. isn't "backpassing" the problem (the name)?

@rudolf didn't say documenting complexity, he said good documentation :grinning: .

In my opinion, backpassing isn't more complicated than an exclamation mark.

But my opinion doesn't matter since I'm coming from Haskell and from my perspective it's all simple to use.

view this post on Zulip Richard Feldman (Aug 27 2024 at 14:57):

Ostar said:

Btw. isn't "backpassing" the problem (the name)?

I wish! :laughing:

view this post on Zulip Brendan Hansknecht (Aug 27 2024 at 16:49):

backpassing isn't more complicated than an exclamation mark.

I really thought the same, but after years of working on roc and helping users, ! is something users are happy with not understanding and handwaving away. <- is strange enough, especially when paired with |> that users feel the need to grok it fully. I think the constraints of ! are probably part of why users just accept it. Code still reads relatively normal and it is only every used as Task.await. Backpassing reads weirder and can be used in some many more contexts.

view this post on Zulip Brendan Hansknecht (Aug 27 2024 at 16:49):

I love backpassing at this point and wish Roc was keeping it, but I totally get why it is being removed and think it is probably the better choice.


Last updated: Jul 06 2025 at 12:14 UTC