Skip to content
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

Added aliases and objects for concrete subject types in Scala. #485

Closed
wants to merge 1 commit into from

Conversation

lossyrob
Copy link

-AsyncSubject[T]
-BehaviorSubject[T]
-PublishSubject[T]
-ReplaySubject[T]

-AsyncSubject[T]
-BehaviorSubject[T]
-PublishSubject[T]
-ReplaySubject[T]
@cloudbees-pull-request-builder

RxJava-pull-requests #410 SUCCESS
This pull request looks good

@headinthebox
Copy link
Contributor

This is not really helping as subjects are “unrelated” to rx.lang.scala.Observable.

At this point I believe we need to give up on transparent interop from Scala to Java.

I am finishing up a binding that feels more native Scala, and is very close to what I catually promise in my slides.

Object Observable {…}
trait Observable[+T] {

def asJavaObservable: rx.Observable[_ <: T]

}

object Observer {…}

trait Observer[-T] {

def asJavaObserver: rx.Observer[_ >: T]

}

object Subject {…}

trait Subject[-T, +R] extends Observable[R] with Observer[T] {

val asJavaSubject: rx.subjects.Subject[_ >: T, _<: R]

}

object Scheduler {…}

trait Scheduler {

def asJavaScheduler: rx.Scheduler;

}

object Notification {…}

trait Notification[+T] {

def asJavaNotification: rx.Notification[_ <: T]

}

object Subscription {…}

trait Subscription {

def asJavaSubscription: rx.Subscription

}

From: Rob Emanuele [mailto:[email protected]]
Sent: Friday, November 15, 2013 2:38 PM
To: Netflix/RxJava
Subject: [RxJava] Added aliases and objects for concrete subject types in Scala. (#485)

-AsyncSubject[T]
-BehaviorSubject[T]
-PublishSubject[T]
-ReplaySubject[T]


You can merge this Pull Request by running

git pull https://github.com/lossyrob/RxJava subjects

Or view, comment on, or merge it at:

#485

Commit Summary

  • Added aliases and objects for concrete subject types.

File Changes

Patch Links:

@lossyrob
Copy link
Author

Fair. I wanted to use PublishSubjects idiomatically from Scala, and wrapping them was in the TODO list, but if something better is in the pipeline then that's great. Is there a link to the slides you mention?

@lossyrob lossyrob closed this Nov 16, 2013
jihoonson pushed a commit to jihoonson/RxJava that referenced this pull request Mar 6, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants