-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
3.x: Proposal: ObservableConverter
interface and friends
#5654
Comments
ObservableConverter
interface and friendsObservableConverter
interface and friends
That would break binary compatibility and otherwise |
This would be an alternative to, not a replacement for. I'm not sure what type mess means, the larger issue is that you can't have something implement |
A |
ah, good point. Would you be against a different name? Like |
Yes, 3.x API cleanup can include this type of change. I otherwise always have separate converters for the base reactive classes. |
I remember we had the discussion about I don't have a strong opinion about changing it in 3.x though. |
In general, I'd like RxJava to have as less interfaces as possible, especially if generic ones like But Java limitations kinda force us to have them here. So I'm ok if 3.x will have dedicated |
ObservableConverter
interface and friendsObservableConverter
interface and friends
Retagged as 3.x. |
I'd like to lean on this for a 2.x consideration again, seeing as 3.x discussion seems to be settling on "not necessary anytime soon". Proposal, to protect against ambiguity, would be to add a new The old |
Project reactor chose the public <R> R as(ObservableConverter<T, R> converter);
public <R> R as(FlowableConverter<T, R> converter);
public <R> R as(SingleConverter<T, R> converter);
public <R> R as(MaybeConverter<T, R> converter);
public <R> R as(CompletableConverter<R> converter); |
I like it! Should I send a PR? |
Sure. |
Done in #5729 |
This has to be still resolved in 3.x where I suggest having only |
Sounds good |
Hi guys, I have a concern which related to this ticket. Here is my code:
Are there any ways to reduce the boilerplate code? or any better approaches to achieve this? Or just write 5 functions for 5 types, something like Thanks. |
Closing via #6514. |
For the
compose()
operators,ObservableTransformer
was introduced to allow for classes to implement multiple transformer interfaces for composite implementations. I'd like to propose doing the same for theto()
operator by introducingObservableConverter
(and corresponding ones for others). This would allow for composite converters as well.If you're open to this, I can contribute a PR!
The text was updated successfully, but these errors were encountered: