Skip to content
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

overload transform / transformToUni / transformToMulti #318

Closed
gavinking opened this issue Oct 3, 2020 · 8 comments
Closed

overload transform / transformToUni / transformToMulti #318

gavinking opened this issue Oct 3, 2020 · 8 comments
Labels
on-roadmap The issue is part of the roadmap
Milestone

Comments

@gavinking
Copy link

It's annoying that the UniOnItem.transformXxxxx() methods don't have overloaded versions that accept Supplier instead of Function, just like call() already does.

(By adding these overloads we alleviate the need for v or ignore parameters in the argument anonymous functions.)

@cescoffier cescoffier added the on-roadmap The issue is part of the roadmap label Oct 4, 2020
@cescoffier
Copy link
Contributor

I faced the same issue over the weekend! So +1.

@cescoffier cescoffier added this to the 0.10.0 milestone Oct 5, 2020
@cescoffier
Copy link
Contributor

But it's not really a transform anymore, it's more a replace.

@jponge
Copy link
Member

jponge commented Oct 5, 2020

Indeed Supplier drops the item. so a Supplier here does not follow the transform semantics.

@jponge
Copy link
Member

jponge commented Oct 5, 2020

@gavinking would UnOnEvent::replaceWith(Supplier<T/Uni<?>>) work for you?

@gavinking
Copy link
Author

That kinda reflects a bit of a deeper confusion over the organization of these methods. See the discussion in #319.

I think we need to clarify our thinking on exactly how the names map to semantics.

One could, for example, make the same criticism of one of the overloads of chain() on Uni.

@jponge
Copy link
Member

jponge commented Oct 5, 2020

I'm collecting thoughts regarding #319 👍

@jponge
Copy link
Member

jponge commented Oct 5, 2020

@gavinking would UnOnEvent::replaceWith(Supplier<T/Uni<?>>) work for you?

and forget this, because it clashes for the compiler

@jponge
Copy link
Member

jponge commented Oct 5, 2020

I'm moving the discussion to #319

@jponge jponge closed this as completed Oct 5, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
on-roadmap The issue is part of the roadmap
Projects
None yet
Development

No branches or pull requests

3 participants