Skip to content

Completable operator review #3580

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
stealthcode opened this issue Dec 17, 2015 · 5 comments
Closed

Completable operator review #3580

stealthcode opened this issue Dec 17, 2015 · 5 comments
Milestone

Comments

@stealthcode
Copy link

Before we release rx.Completable into the wild (that is before we release v1.1.1) I'd like to open up a thread for discussion regarding Completable's instance methods, static methods, as well as any conversion methods to/from Observable and Single. Please feel free to review and comment here with any concerns. Any that need to be addressed should result in either a PR or another issue to track or discuss.

@stealthcode
Copy link
Author

Note that there is already a discussion in #3570 regarding the instance method Observable<T> endsWith(Observable<T>) and the proposed rename to andThen.

@stealthcode
Copy link
Author

If we rename endWith then I suggest we rename the Completable startWith(Observable<T>) method to an overload of concatWith(Observable<T>) and deleting Completable startWith(Completable).

@stealthcode
Copy link
Author

Also the get() method (and overload) are very similar to the functionality of Observable.toBlocking() except that it returns the error if any exists. This differs from Observable and Single toBlocking in that a BlockingObservable will throw any exception emitted to the subscriber's onError. Should we make Completable's get method consistent in behavior with a BlockingObservable? If so then a rename may also be in order. Thoughts?

@akarnokd
Copy link
Member

rename the Completable startWith(Observable) method to an overload of concatWith(Observable)

The problem with this rename is that startWith indicates the Observable runs first whereas concatWith indicates the Observable runs last which doesn't preserve the intention.

deleting Completable startWith(Completable)

Okay.

Also the get() method (and overload) are very similar to the functionality of Observable.toBlocking() except that it returns the error if any exists.

I've omitted BlockingCompletable because there are only 2 x 2 reasonable blocking operations: await and get() +1 timed overload each. But we can remove get for the sake of clarity.

@akarnokd
Copy link
Member

Any more on this or can it be closed?

@akarnokd akarnokd added this to the 1.2 milestone Jun 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants