Hacker Timesnew | past | comments | ask | show | jobs | submitlogin

> 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?



Is 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.


Dart 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.


Checkout C++11. It has lambda callbacks, promises/futures and async with threading.


I don't think C++11 is a comparable alternative to node, personally. Although I understand that's a subjective judgment on my part.


Have 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.


Or luvit (libuv + Lua)


Scala+finagle is comparable in use cases, but scala isn't very close to javascript. Perhaps still worth looking into though.


It probably would be fairly straightforward to write a generator that wrapped every function in a module with Q.nfcall.


Dart. Look for Future and Stream.


The E language http://erights.org/ works that way. It's unfortunately been inactive for years; its BDFL moved on to the Javascript committee.


Take a look at CoffeeScript (cleaner callbacks) and ToffeeScript (callbacks hidden, just look like sync code). Those are much better solutions that promises.


You may find https://npmjs.org/package/pr useful.


node + clojurescript. you can do better than promises.

http://swannodette.github.io/2013/07/12/communicating-sequen...




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: