Hacker News new | ask | show | jobs
by cwmma 4273 days ago
yes generators can help you control the flow as you do async programing, but you can't use generators to do something like an ajax function which gives you an async value, you'd need promises or something for that, generators allow you do use those async function is a more natural way.
1 comments

Promises _are_ an async value. By yielding promises you're doing exactly that :)