Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support AGen specification for asynchronous generators #36

Closed
CrabDude opened this issue Oct 30, 2013 · 3 comments
Closed

Support AGen specification for asynchronous generators #36

CrabDude opened this issue Oct 30, 2013 · 3 comments

Comments

@CrabDude
Copy link

To generate discussion, feedback and achieve interoperability:

@Raynos and I put together the AGen specification with feedback from @creationix for asynchronous generators, generators + asynchrony (e.g., promises, continuables, etc...) which we're using in our own libraries (gens) to create a cohesive specification for asynchronous generator interoperability.

Some highlights:

  • Asynchrony agnostic: implementor/user could support promises, thunks, or something new and exotic, but must support yielding on generator objects.
  • Support for serial (vanilla yield) or parallel (yield [...]) execution.
  • Separation of Errors and Exceptions
@Raynos
Copy link

Raynos commented Oct 30, 2013

Right now the AGen spec has some thought into it to handle the majority of the common use cases without external helper libraries.

If we can get some minimal interop between generator runner libraries you can start exporting generator functions on npm and use yield* functionFromOtherModule().

Feedback is welcome on what a good minimal set of runner functionality is so that generator functions exported by modules can work with multiple runners

@tj
Copy link
Owner

tj commented Oct 31, 2013

cool ill try and take a look at the spec soon, the end-goal is to delegate the use of a backing lib to the app? sounds reasonable to me, it's a little unfortunate that we'd have to end up using yield * everywhere haha, but I guess that's as good as we get with javascript

@jonathanong
Copy link
Contributor

closing for now since it's so vague. reopen if you have specifics.

honestly, i don't think people should be writing stuff with generators. return promises =/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants