Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I still don't understand why I'd want to use async/await in a mobile/desktop app over something like Rx (Combine). Is there a good rundown on when to use one or the other?


I wondered the same thing actually. After I read about async await I thought “Well, what’s the point in Combine then?”


It’s your choice - you want Rx - you do Rx. Everyone gets something.


Yes but my question is more about what tradeoffs should I be looking for to decide which to use. There does not seem to be a simple way to bridge the worlds, so deciding early is probably necessary.

From what I'm gathering I should stick to Rx (Combine) when I have multiple related tasks or want to fire off changes in response to events, whereas async/await is useful for one-off asynchronous tasks like most web requests? I'm really not sure.


also interested in async vs combine, but i’m the other way around - unless you want to fight for rx programming i see Combine being in a very weird place. it looks like existing Foundation stuff will be easy to change to async, and for teammates without rx experience Combine can be a big mental model shift. plus Combine doesn’t compile on Linux, which is a big deterrent for me when thinking about how I might want to approach a Swift command line app.


async/await are trivial to understand and use.

Anything Rx beyond the simplest of examples? Nope.


Rx is very powerful and can be difficult to understand at first, especially if you haven't done a lot of programming in functional languages before.

I'm not trying to argue about that though - I just want to know under what set of circumstances I should prefer async/await over Rx and vice versa.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: