-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
tryMap & flatMap operators #33
Comments
Haha,
For functions that can accept selector, there is usually *orDie overload that returns The orDie suffix was chosen as a explanation what will happen if function fails. Entire sink chain will be disposed. Maybe I should reconsider the wording in next 2.0 version. So in case of You have ... |
That's great news! 👍 |
I usually learn where I've messed something when people are confused, so I'm solving one confusion at a time :) Feel free to let me know if there are other pain points. |
FYI, flatMap has entered develop branch, and he brought two friends with him :) It will be released end week with other improvements. |
Great, @kzaher! Thank you... I was thinking about the OrDie functions. Maybe it would be clearer if they were called something like 'assertMap' as a prefix. Or even "mapOrError". I have to confess I was afraid to use these "OrDie" functions at first because of their names, hahaha... |
Then I'm glad they are working as designed and scare people :) That was my actual intention ;) Maybe I should rename |
That would be awesome! 😝 |
Hi, I think that your other suggestion you've made on Slack For now, I'll close this issue since |
ReactiveCocoa has an operator which is called
tryMap
is not the best name but I think we should have something similar on RxSwift.On RxJava, the
map
itself is able to handle any runtime errors and just send an error event in case something throws inside themap
operator. That would be the nicest way to have it. And maybe with Swift 2 will be able to.But for now, how can we approach that?
Another operator that's really, really missing is a flatMap, don't you think?
I guess I could help with that, but I am creating this issue to discuss before.
The text was updated successfully, but these errors were encountered: