Allow exception propagation to Swift for Flows #19
ubuntudroid
started this conversation in
Ideas
Replies: 2 comments
-
Thanks for the feature proposal. For those interested in this feature, you can show your interest by "voting" using the emojis, as some already did, or by leaving a comment. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I'm also a fan of result wrappers and other monads, but the coroutines have declared a certain type of contract, and I'd like equal adherence to that contract across platforms. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Right now SKIE doesn't forward errors in Kotlin Flows to Swift.
As per the migration guide:
I'm a big fan of result wrappers with error state support myself. However, not propagating errors creates a different handling when comparing Swift observers and Kotlin observers which needs to be kept in the back of ones head when developing shared code and also on the receiving end.
Therefore, I would at least make error propagation optional and enable it by default. Developers could then disable it based on a conscious decision.
Having it enabled by default would likely be more what Kotlin developers new to SKIE would expect without reading through the docs (which obviously is still recommended, but I found that taking the position of a complete newcomer usually is a good test for what should be the default for options).
Beta Was this translation helpful? Give feedback.
All reactions