The article mentions that async/await functionality hasn't landed in Javascript yet. I wonder if you can get the same functionality today using scala.js [0] and the scala/async [1] library. I believe it should work. The scala/async library is just a set of macros that transform blocks of code using async/await into for comprehensions. [0] http://www.scala-js.org [1] https://github.com/scala/async
RxJS is great. So why have I moved on?
31–40 of 40 posts
Re: RxJS is great. So why have I moved on?
#32Discovering and mastering bacon.js/FRP completely changed the way I think about programming. It hugely increased the quality and stability of my code in ways that continue to surprise and amaze me. I cannot recommend it enough, but this article definitely has me curious about ClojureScript. In the meantime, the biggest issue I've had with bacon is figuring out what are the best practices in organizing the code. One d…
Re: RxJS is great. So why have I moved on?
#33Earlier quoted context omitted.
I started recently, but I find them fairly decent. And there is not much to it, really. > I didn't think it had the equvalent of Reagent's reactions until I got towards the bottom of the react-redux page Is that the subscription mechanism? I have yet to find a use for it...
> And there is not much to it, really. The two use the same model but are organized differently so it throws me off a bit. Re-frame chooses to hide the actual reduction step so instead of the big switch statement you have a bunch of registered event handlers, which are pure functions take the state and event and return the new state. The middleware is HoF around these so it's done per-handler as well as at the base r…
Re: RxJS is great. So why have I moved on?
#34Core.async is not a substitute for Rx. As a disclaimer I'm the author of an Rx-inspired library for Scala [1] and that also works for Scala.js in the browser. Shameless plug aside, Scala also has Future/Promise in its standard library and now due to macros support it got scala/async [2], a library that gives you the "await" keyword in Scala, so in Scala you also get this kind of M:N multithreading that looks like syn…
For example, re-frame, zelkova (Elm-like thing in ClojureScript[1]) and others (eg the in-house thing I wrote before I came across re-frame) are implemented using core.async
So, no, its not a substitute - its a (potential) building block.
Re: RxJS is great. So why have I moved on?
#35RxJS is not designed to be pull-based which makes it hard to use it for something else than UI code. I hope this will change with RxNext.
I was expecting more pull based support.
Is this what you are talking about ? https://github.com/ReactiveX/RxJS/pull/138
It looks like its already merged in.
Re: RxJS is great. So why have I moved on?
#36Re: RxJS is great. So why have I moved on?
#37Re: RxJS is great. So why have I moved on?
#38The whole thing reminds me of C++ years ago, where the language allowed for really smart and efficient coding style, but many less skilled developers at the time had problems with deep understanding of templates, operator overloading, multiple inheritance, various constructors and such. Pragmatic companies (e.g. Mozilla) thus decided to ban all the advanced features and stick just to basic ones so that the code would be maintainable.
I think RxJS is facing similar fate. I've spent quite some time learning it and I think it is one of the more complex paradigms on the market today. In addition there isn't much useful documentation. Feel free to check stack overflow and find out about the struggles people are going through tying to extend basic examples (e.g. google for rxjs mousedrag).
Re: RxJS is great. So why have I moved on?
#39The article mentions that async/await functionality hasn't landed in Javascript yet. I wonder if you can get the same functionality today using scala.js [0] and the scala/async [1] library. I believe it should work. The scala/async library is just a set of macros that transform blocks of code using async/await into for comprehensions. [0] http://www.scala-js.org [1] https://github.com/scala/async
Re: RxJS is great. So why have I moved on?
#40Discovering and mastering bacon.js/FRP completely changed the way I think about programming. It hugely increased the quality and stability of my code in ways that continue to surprise and amaze me. I cannot recommend it enough, but this article definitely has me curious about ClojureScript. In the meantime, the biggest issue I've had with bacon is figuring out what are the best practices in organizing the code. One d…
CycleJS, which is based on RxJS and smaller than most of the "full blown" frameworks and SPAs, I think has a good approach to code organization in its MVI (Model-View-Intent) documentation: http://cycle.js.org/model-view-intent.html For a couple of projects I'm working on I've been slowly iterating towards one sort of deeper formalization of Cycle's MVI, but I haven't published any of that work yet.