Closed dhoepelman closed 7 years ago
Hi, cool that you're willing to tackle (A)SyncOnSubscribe :smiley:
Approach 3a is nice, but instead of creating a new ObserverValue[T]
class, we should use the already existing Notification[T]
.
However, I'm not sure if it's a good idea to diverge so much from RxJava, because this API is already quite complex to understand, and it would be very beneficial if the documentation, blog posts etc about RxJava are directly applicable to RxScala as well. So overall, I'd prefer approach 2.
Regarding the constructor name on object (A)SyncOnSubscribe
: I would not just call it apply
, but use the same three names as in RxJava (createSingleState
, createStateful
, createStateless
). And I like your suggestion to use a default argument for onUnsubscribe
:smiley:
Thanks for the input!
I didn't know of Notification[T]
, that makes more sense. I'll port the methods you mentioned and maybe create an extra one, since State => (Notification[T], State)
feel more FP/Typesafe
Right, these two approaches can coexist. Just make sure there are no method overloading ambiguities (like this one, for instance).
Fixed with #220
Hi,
are there any plans on implementing RxJava 1.2's
AsyncOnSubscribe
andSyncOnSubscribe
? I could contribute an implementation, but am unsure about the preferred signature.I'm leaning towards 3b, but see good arguments for 2 and all 3's.