AsyncSequence for the Effects system? #589
Replies: 2 comments 6 replies
-
Hi @oliverepper, this is a really exciting topic for Swift and TCA, but unfortunately @stephencelis and I have both been traveling this week and haven't had much time to think through implications for the library. We have a foggy idea of making But, I will say that we 100% agree with your idea that TCA would benefit greatly from losing its dependency on Combine, and we'd love to make that happen. There are some questions around effect cancellation, time based effects and schedulers, but we feel pretty confident they can either be solved or we can always allow Combine-style publishers for effects that can't be expressed purely with async/await. |
Beta Was this translation helpful? Give feedback.
-
I tried to redefine Effect to use the signature: () async -> A? instead of combine. public struct Effect {
} |
Beta Was this translation helpful? Give feedback.
-
Hi all!
From watching the first sessions about swift concurrency I asked myself if Combine couldn't be replaced with AsyncSequences in the effects system. From my understanding AsyncSequences should be able do deliver everything that Combine Publishers do, even considering backpressure/demand handling. (not 100% sure, yet). Replacing Combine would free TCA from a closed source dependency and maybe opening up the possibility to be used on the other platforms that Swift can be deployed to.
Beta Was this translation helpful? Give feedback.
All reactions