Qactive icon indicating copy to clipboard operation
Qactive copied to clipboard

Reconsider Subject Closures

Open RxDave opened this issue 8 years ago • 1 comments

Check to see whether subject closures work as expected (I believe they do not at the moment). Shouldn't closing over a subject be treated as an IObservable closure by default? Even though it's ambiguous, assuming that the IObserver side was the author's intention seems wrong most times; however sometimes it's not, as in a chat app. So perhaps calls to Subscribe can be special-cased to treat subject closures as IObserver, but IObservable in any other case.

RxDave avatar May 31 '16 11:05 RxDave

Partially implemented in v2.0.4. Subjects (or any type implementing IObservable<T>) can now be used where an IObservable<T> is explicitly expected and it will automatically be treated as a duplex callback. Likewise, any type implementing IEnumerable<T> can be used where an IEnumerable<T> is explicitly expected and it will automatically be treated as a duplex callback.

Leaving this open for consideration of IObserver<T>.

RxDave avatar Jun 21 '16 02:06 RxDave