5 ms·
> Callbacks will remain the de facto way to implement > asynchrony. Generators and Promises are interesting and > will remain a userland option. " I am seeki
by kailuowang 13y ago
> Callbacks will remain the de facto way to implement
> asynchrony. Generators and Promises are interesting and
> will remain a userland option. "
I am seeking for a comparable alternative to node (or something on top of node) in which Promises are the de facto way to implement async. Any suggestions?
- halayli 13y agoCheckout C++11. It has lambda callbacks, promises/futures and async with threading.
- usea 13y agoI don't think C++11 is a comparable alternative to node, personally. Although I understand that's a subjective judgment on my part.
- CyruzDraxs 13y agoHave a look at node.native. It's just libuv and c++11, which behaves pretty much the same as node. But much lighter, and with no Javascript engine tacked on. Obviously not nearly as stable and supported, but it's an example of how c++11 can work very similarly.
- rmgraham 13y agoOr luvit (libuv + Lua)
- uniclaude 13y agoIs the fact that they use callbacks instead of Promises outside of userland a real problem for you (as an application developer)? You can totally write your node applications using only Promises using something like Q if you feel like it.
- bryanlarsen 13y agoIt probably would be fairly straightforward to write a generator that wrapped every function in a module with Q.nfcall.
- abecedarius 13y agoThe E language http://erights.org/ http://erights.org/ works that way. It's unfortunately been inactive for years; its BDFL moved on to the Javascript committee.
- fizx 13y agoScala+finagle is comparable in use cases, but scala isn't very close to javascript. Perhaps still worth looking into though.
- agilord 13y agoDart. Look for Future and Stream.
- spankalee 13y agoDart is very Node-like is that it's event based, but almost all async APIs are based on Future and Streams, including all IO, and therefore any other packages that do IO, like database drivers. This makes things very consistent and composable. On top of that you get to use a much nicer language than JavaScript.
- ilaksh 13y agoTake a look at CoffeeScript (cleaner callbacks) and ToffeeScript (callbacks hidden, just look like sync code). Those are much better solutions that promises.
- domenicd 13y agoYou may find https://npmjs.org/package/pr https://npmjs.org/package/pr useful.
- dustingetz 13y agonode + clojurescript. you can do better than promises. http://swannodette.github.io/2013/07/12/communicating-sequential-processes/ http://swannodette.github.io/2013/07/12/communicating-sequen...