Hacker News new | ask | show | jobs
by fzzzy 4855 days ago
By the way, it is absolutely possible to implement a message passing style on top of generators instead of some random ad hoc resumption policy. Check it out:

https://github.com/fzzzy/pavel.js

The only caveat is that you do have to write "yield receive('pattern')" instead of just "receive('pattern')".