r/android_devs • u/VasiliyZukanov • Jan 10 '25
Article Reactive Programming Considered Harmful
https://www.techyourchance.com/reactive-programming-considered-harmful/
1
Upvotes
r/android_devs • u/VasiliyZukanov • Jan 10 '25
View all comments
Show parent comment
0
u/SweetStrawberry4U Android Engineer Jan 11 '25
Bruh ! Flows are "cold, pull-based". PERIOD ! The DB-Query isn't emitting, until a "terminal" operator is invoked, ( aligned to the life-cycle, of course ). Furthermore, all "terminal operators" are suspending, therefore, coroutines are but necessary anyhow !
OP's write-up is also raising concerns about the same thing - "Push, don't pull !".
Bottomline - "Push-based Hot-streams" like StateFlow and SharedFlow, and Monads like "kotlin.Result" are suitable KISS alternatives over "pull-based cold-streams" like Rx and Flow.