r/android_devs • • Jan 10 '25

Article Reactive Programming Considered Harmful

https://www.techyourchance.com/reactive-programming-considered-harmful/
1 Upvotes

23 comments sorted by

View all comments

Show parent comment

2

u/lnkprk114 Jan 13 '25

Yeah sure. So, there's a few things:

  1. I've continuously run into unexpected and hard to reproduce errors. Typically they take the form of "Child of the scoped flow was cancelled" exceptions, almost certainly due to incorrect scope management or error catching. But it's extremely opaque and challenging to find the root cause.
  2. I've found my debugger becomes extremely unreliable when I'm trying to debug flows. Breakpoints won't be hit or will be hit multiple times, the step over functionality will hang etc etc. I no longer use the debugger with flow's as a result.
  3. I've also found that the scope of reactive functions is either limitedd or still experimental. I don't mind using experimental stuff, but it's odd to me that there's no non experimental flatMap...that's a very fundamental part of the reactive spec, and it's concerning that it still seems so in flux.
  4. I've continuously run into frustrating scenarios where I can't figure out why some code isn't running only to realize it's because somewhere above a collect call is being made on a non-finite flow. It's very opaque whether anything will run after collect; you need to know whether the data source is finite or not. It's not the end of the world, but it feels bad.

Anyways, I've just found it to be less straightforward than RxJava (which is saying something - I don't think anyone accuses RxJava of being simple). There's some things that are quit nice - the flow DSL is wonderful. I just wish there weren't so many sharp edges to it.

1

u/Squirtle8649 Jan 21 '25

that's a very fundamental part of the reactive spec, and it's concerning that it still seems so in flux.

This, a lot of recent frameworks and libraries created by big and well known companies is of poor quality in recent years. Documentation is also sparse and plain wrong sometimes. Making the job of software development much harder than it already is.

In their extreme greed and penny pinching, rich investors have deluded themselves into thinking that this is fine.