RxJava3-preview icon indicating copy to clipboard operation
RxJava3-preview copied to clipboard

Why Completeable/Maybe

Open ZakTaccardi opened this issue 8 years ago • 3 comments

On Android, one of the issues with RxJava is the method count.

Because of this limitation, I don't see the value of Completable or Maybe.

Both types return once, like Single<T>. As a Kotlin developer, representing T as a sealed class gives me all the power of a Completable or a Maybe.

I'd like to see a module with just Flowable<T> and Single<T>, somehow, if this could drastically reduce method counts.

Just thoughts..

ZakTaccardi avatar Nov 16 '17 19:11 ZakTaccardi

RxJava 2 proguards well as I heard so method count shouldn't be an issue.

However, if you know any technologies or have the time, we could investigate some library-rewriting options where one can cherry-pick types and methods upfront and depend on a custom-made library.

akarnokd avatar Nov 16 '17 20:11 akarnokd

where one can cherry-pick types and methods upfront and depend on a custom-made library

I don't think this would actually be possible in Java, if you wanted to keep the .toCompletable() fluent style of calling methods.

Kotlin's extension methods on the other hand..

ZakTaccardi avatar Nov 16 '17 21:11 ZakTaccardi

If you never call .toCompletable() ProGuard will remove that method and the entire Completable type.

JakeWharton avatar Nov 16 '17 21:11 JakeWharton