rxscala-js icon indicating copy to clipboard operation
rxscala-js copied to clipboard

Overloaded .subscribe inference

Open KadekM opened this issue 8 years ago • 5 comments

There is what I believe same inference problem as in #6 with subscribe method, which is very unfortunace... Can we do do something about it ?

KadekM avatar Nov 22 '16 13:11 KadekM

Which of the two subscribe signatures do you think is more important? The apply function if the Observable class has the onNext as it's apply function if that helps.

LukaJCB avatar Nov 22 '16 14:11 LukaJCB

Both are important :/ it's shame scala's not good with overloaded methods

KadekM avatar Nov 22 '16 14:11 KadekM

We don't have to solve it right away - I don't know what's best way to go about it (since my guess is it's gonna be problem in most overloaded methods)... but we can keep the issue open to recognize limitations

KadekM avatar Nov 22 '16 14:11 KadekM

Yeah, unfortunately the original RxScala api suffers from the same problems. We could create extra functions instead of overloads, but I don't want to strain to far from the original API.

LukaJCB avatar Nov 22 '16 14:11 LukaJCB

Yea, straining from api is my biggest worry. That would just bring gap to newcomers trying to use typed rx with scala.js... but so will different naming =/

KadekM avatar Nov 22 '16 14:11 KadekM