3 ms·
https://github.com/kriskowal/q https://github.com/kriskowal/q solves this today without needing to cross compile. http://koush.com/post/yield-await-v8 http://ko
by tuxracer 13y ago
https://github.com/kriskowal/q https://github.com/kriskowal/q solves this today without needing to cross compile. http://koush.com/post/yield-await-v8 http://koush.com/post/yield-await-v8 will address this natively however unlike Q or Kal you can't start using it today.
- ricardobeat 13y agoThere is no need for hacks, just run node with the `--harmony` flag to get yield support today. Q is a huge, monster library. It's 2x the size of caolan/async, which is already bloated. I personally think it's better to use https://github.com/mbostock/queue https://github.com/mbostock/queue or another small, understandable library.
- graue 13y agoRespectfully, is it possible you've confused Q with something else? I compressed and minified both caolan/async and kriskowal/q. Result: async is 3.4 KB, q is 4.1 KB. I grant you that mbostock's queue is even smaller, but all are so tiny as to be a trivial download even on mobile. The important issue here is IMHO not the size of the libraries, but how much they help you write maintainable code.
- ChiperSoft 13y agoIf you're taking about node, what difference does it make how large the library is?
- ricardobeat 13y agoThese libraries work in the browser. It's not just size: debugging, understanding code, and performance matter too.
- rzimmerman 13y agoQ and ECMAScript 6 solve the callback issue, but I think people might like the built in async iterators and error handling.