-
Notifications
You must be signed in to change notification settings - Fork 7.6k
2.x: reduce number of operator overloads #4153
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
Comments
I have another suggestion: source generate the missing overloads (using a Gradle plugin for example) so that we keep the class in the repository small but the actual included class has all available overloads. This I feel is a good compromise between the Observable/Flowable classes being readable as well as giving the benefits of the extra overloads to the user. |
I'm not sure management of the overloads has ever itself been a problem. If On Thu, Jun 30, 2016 at 2:00 PM Lalit Maganti [email protected]
|
The aim is to reduce the method count, mostly for Android's sake but also for the IDEs. |
Closing via #4413. |
RxJava has several hundred methods in
Flowable
andObservable
each, many of them overloads of the same operator with different parameters because Java doesn't support default parameter values or that using methods with varargs is inconvenient at times.To reduce the numbers, I suggest the following removals:
concat(p1, p2, p3, p4, p5, p6, p7, p8)
andzip(p1, p2, p3, p4, p5, p6, p7, Function7)
observeOn(Scheduler)
andobserveOn(Scheduler, delayError, prefetch)
,flatMap(mapper)
andflatMap(mapper, maxConcurrency, delayError, prefetch)
For this latter, the documentation has to be enhanced to give examples of what defaults to use.
The text was updated successfully, but these errors were encountered: