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

When you use Generators for this style of concurrency, generators are comparable to async/await. The difference is that with async/await support, you still have the option for your promises to resolve generators.

Basically by using generators for co-routines, you preclude yourself from some use-cases that generators normally provide.

> Generators are not as useful and are more niche. Am I wrong?

I would say that generators are more general, and async/await actually more specific to a single use-case.



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

Search: