-
Notifications
You must be signed in to change notification settings - Fork 24
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
Add syntax to convert Future to Rx #42
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The implementation is so small and it requires no 3rd party dependencies, what do you think about including it in the core module?
import scala.util.Try | ||
import mhtml.{Rx, Var} | ||
|
||
object Utils { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The module implementation is almost smaller than the build changes! :D
@olafurpg That's would create an asymmetry with a potential sub project for |
The point of the
Is there a similar http client like |
Yes, RosHttp
…On Mar 23, 2017 5:21 AM, "Ólafur Páll Geirsson" ***@***.***> wrote:
The point of the toRx helper is to get rid of scala.concurrent.Future,
the most common use case being to wrap Ajax.{get,post} requests like
here: https://github.com/OlivierBlanvillain/monadic-html/blob/
254e5cf/examples/src/main/
scala/mhtml/examples/GithubAvatar.scala#L46
Is there a similar http client like Ajax.get based on monix?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#42 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AA37jhuevc-21Cas5MXOcMYquoMEaCdWks5rojmrgaJpZM4MlBwR>
.
|
RosHttp is not free from scala.concurrent.Future https://github.com/hmil/RosHTTP/search?utf8=%E2%9C%93&q=scala.concurrent.Future&type= My point is just that monix and concurrent.Future are not mutally exclusive. I don't see the need for a |
Also a port to monix Task should be trivial: https://gist.github.com/OlivierBlanvillain/4105d05aea258b56f9317b3c81072118 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sweet, then I'm fine with creating a -future
module 👍
"I also don't want to make it more convenient to use scala.concurrent.Future over monix.Task since I strongly believe the latter is superior." Future seems to be more frequent in occurrence than monix, partly because it is standard (not because it is better). I feel like this comes up frequently enough that it is worth merging. A FAQ or gist could be linked to if we want to make it easy for people to add something similar when using monix, and if nothing else, the Future example provides a good template for people to start from when implementing conversions from other async libraries. |
Alright, I'm sold, I'm going to get back to this PR and merge something for |
d8f164e
to
6c47833
Compare
No description provided.