RxDave / Qactive

Reactive queryable observable framework.
Apache License 2.0
157 stars 20 forks source link

Reconsider Subject Closures #13

Open RxDave opened 8 years ago

RxDave commented 8 years ago

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 commented 8 years ago

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>.