R3 icon indicating copy to clipboard operation
R3 copied to clipboard

Is there a technical reason as to why there are no interfaces for `Observable<T>`?

Open grofit opened this issue 1 year ago • 0 comments

Long time user of rx and unirx and I am evaluating R3 but one thing that struck me right away was that there was no interfaces on most classes.

I was wondering if this was maybe because:

  • IObservable<T> is already taken in .Net and you didnt want to have IR3Observable or something
  • There is a performance consideration of having the interface (to my knowledge this would only matter if you used logic as the interface)
  • There would never be any other implementations so it was deemed superfluous

I am not massively fussed but a use case that came up when evaluating was I had some code which had the notion of an IComputed<T> which inherited from IObservable<T> and there was a few interfaces that built on top of that IComputed but ultimately it provided IReadOnlyReactiveProperty like functionality but with the user specifying how the computed should be hooked up.

Anyway none of that is really important, but I can no longer have my IComputed depending on an underlying interface which again isnt a massive problem but it got me wondering why there was no interface provided and if maybe there is some merit to having one.

grofit avatar May 20 '24 20:05 grofit