Skip to content

Add process() method to Publisher. #124

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

Closed
ldaley opened this issue Oct 8, 2014 · 4 comments
Closed

Add process() method to Publisher. #124

ldaley opened this issue Oct 8, 2014 · 4 comments

Comments

@ldaley
Copy link
Contributor

ldaley commented Oct 8, 2014

It seems that Processor would be a lot more useful if it supported chaining. This could be done by adding the following to Publisher:

interface Publisher<T> {  
  <R> process(Processor<? super T, ? extends R> processor);
}

It would be boilerplate for implementors to support, but I don't think that's a problem.

@viktorklang
Copy link
Contributor

What's wrong with publisher.subscribe(processor)?

@ldaley
Copy link
Contributor Author

ldaley commented Oct 8, 2014

What's wrong with publisher.subscribe(processor)?

Doesn't support chaining, which is the point of my proposal.

Also, keep in mind that the RS interfaces is for interoperability, not for end-user APIs.

Then what's the point of having Processor at all? I can't see any value to it if it's just about interop.

@viktorklang
Copy link
Contributor

@alkemist That's a whole other discussion, I'd recommend to go through the closed issues, they contain a lot of the rationale and decisions, in this case: #22

@ldaley
Copy link
Contributor Author

ldaley commented Oct 8, 2014

I don't have anything to add that hasn't already been said in that issue.

@ldaley ldaley closed this as completed Oct 8, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants