-
Notifications
You must be signed in to change notification settings - Fork 7.6k
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
Purpose of rx.util.Opening and rx.util.Closing interfaces? #540
Comments
I think they are historical artifacts, less types == better IMHO. On Thu, Nov 28, 2013 at 2:47 PM, akarnokd [email protected] wrote:
|
On a related issue, we should move ObserverBase from rx.joins to rx right next to the Observer interface. Nobody should directly implement Observer. ObserverBase ensure that the Rx contract is enforced. It is a bit ugly that you need to override XXXCore, so we should also add Observer.create or a constructor with overloads that take funcs, as well as one that takes an Observer itself (which can be unsafe). You want to take this? See http://msdn.microsoft.com/en-us/library/hh211985(v=vs.103).aspx. |
@headinthebox Sure I would do the refactorings, but I think ObserverBase should be placed under rx.operators similar to the SafeObserver and SynchronizedObserver classes. |
Probably yes, and there is a lot of duplication between all of these various observers, so you may want to have a look at that as well. |
If its job is to ensure the contract is kept then that is what SafeObserver does. |
Yes, we have kept the rx package to only the most top-level things, so I agree this should be elsewhere. However, thus far the rx.operators package is not considered part of the public API and is excluded from Javadocs. If we are to have public Observers then it would be an rx.observers package like rx.observables. The rx.operators package is internal implementations and can be changed without breaking users. |
I did the refactorings but couldn't get the Observable.scala working with it: akarnokd@7f36286 Could someone help with that part?
|
Observable is covariant in its type parameter. In Scala, when you use a Scala type, scalac knows this automatically, because it's declared where the type is declared (using |
Is there a particular reason these two interfaces are used by the various buffer() and window() operators instead of allowing arbitrary generic types for opening and closing buffers/windows similar to the duration selectors in join() & groupByUntil()?
The text was updated successfully, but these errors were encountered: