3.x: Disambiguate startWith(T|Iterable)? · Issue #6122 · ReactiveX/RxJava (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

@akarnokd

Description

@akarnokd

We were using postfixes to avoid inference problems around operator methods (such as fromIterable vs fromArray) but there is at least one operator currently, startWith, that may exhibit type ambiguity. A dedicated postfixed name should resolve the issue, such as:

  1. startWith(T) + startWithIterable(Iterable<T>)
  2. startWithItem(T) + startWith(Iterable<T>) + remove startWith(T)
  3. startWithItem(T) + startWithIterable(Iterable<T>) + remove startWith(T).

As a preparation, we can deprecate startWith(T) within 2.2.x in case option 2 or 3 is chosen.