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
bind
function may cause ambiguity
#2599
Comments
Interesting... As a side note though, ignoring the return value in this case is a guaranteed memory leak, and assigning it to a dispose bag will resolve the issue regarding which method will be used. So, I agree with you in theory, but in practice, this isn't an issue. |
yeah, In our project, there have |
I personally have always used |
You are right, But I just like less code, May be I should write more clearly. |
Hey there, I don't really see how this is an issue with RxSwift :) It's not ambiguity if you choose to use a possibly wrong overload. We also can't (and won't) rename methods that are part of the library for a very long time. My main suggestion would be that if you have a very specific use case where you use take(1) a lot, etc, perhaps write your own extension on Observable for your own project. I'm not entirely sure this fits in the scope of fixing anything inside the project. Thanks for the suggestion though! |
RxCocoa 6.7.1
RxSwift 6.7.1
Xcode 15.3
This two function may cause ambiguity in some cases, such as:
In this case, the
test
method will be executed synchronously, don`t as I expect bind totest
function ifry
changedSo I suggest change the name of the
func bind<Result>(to binder: (Self) -> Result) -> Result
methodThe text was updated successfully, but these errors were encountered: