Closed sebastianvarela closed 4 years ago
I am strongly against this proposal. It doesn’t bring any value, just allows to implement things in another way. It’s obviously just a wrapper around existing methods. They will be confusing for a new user. They are not express “drive/bind/emit” behavior of different traits. This “sweetness” is subjective. I don’t think this these operators are more readable. As I know RxSwift already had similar operators long time ago, but they were removed. Operators should not be added just because of personal preferences or because they are defined in ReactiveSwift. It’s a separate project. You can declare these operators locally, but I don’t see any pros in contributing them to community. Even in Ext. Sincerely
Sent with GitHawk
I see the point and I agree with you @MortyMerr. However, in my opinion, the way you wrote this message seems harsh and unwelcoming. Even though I didn't make this proposal, I felt uncomfortable reading your answer. 😅😅
@jdisho lol 😅 My message is just about arguments 😀 What do you want me to do with it? 🤗Add an emoji after each sentence? 😊
I think it would be great to show some kindness and appreciation, at least for the time invested to make a proposal (as an issue or pull-request). 😊
Sent with GitHawk
Leaving the sentiments and appreciation for the code aside, I also agree that whatever value this PR would bring is not universal enough to share in this repo (personal opinion of course).
Custom operators are a touchy subject, too many people are entirely against it, and they're very easy to make. So I think people who are for this usually just add them, so it doesn't justify adding here regardless of the time put into making the suggestion.
I suppose we can close this issue.
Name and description
After several years working with ReactiveSwift now we have a long-term project that use RxSwift. The first thing I miss is the binding operator for observables/observer.
When someone want to bind an
observer
to anobservable
have to do something like this:I made an extension that create two operators to link observer-observable-disposebag:
Motivation for inclusion
When you use MVVM, for example, and you have a lot of binding inside a func, this operator improve the legibility of the code by removing all the boilerplate.
Example of use
or
You can also use a closure or a func to just observe an observable by using:
or