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

Add support for promises & thunks as a requirement #6

Open
Raynos opened this issue Nov 2, 2013 · 3 comments
Open

Add support for promises & thunks as a requirement #6

Raynos opened this issue Nov 2, 2013 · 3 comments

Comments

@Raynos
Copy link
Contributor

Raynos commented Nov 2, 2013

This would allow authors to publish generator modules that yield promises or thunks and they would be Agen compliant.

The downside is the Agen spec is applying opinion and every runner has to support at least these two.

The other downside is that every other asynchrony me feel second citizen.

@spion
Copy link

spion commented Nov 4, 2013

Well, other asynchronies are already de-facto second citizens. Even promises are second citizens in node.js. - though they're part of ES6 now, and are gaining a lot of traction in the browser.

I think it would be valuable to make a list of 10 (popular?) async generator libraries and see what they support. More importantly, to try and find generator libraries that use other more esoteric asynchrony types. These might provide valuable insight on how to leave just enough wiggle room in the spec. Do you guys know of any? I'll try to find some...

Of course, this wont help asyncrony types that haven't been invented yet, but since its impossible to predict the needs of those, I think the spec shouldn't try to do it either...

@CrabDude
Copy link
Member

CrabDude commented Nov 5, 2013

I think the solution here is to probably create a child spec that extends AGen to include thunks & promises. I strongly see value in staying out of having an opinion on which asynchrony should be supported.

Additionally, I strongly see value in an AGen compliant spec that whitelists thunks and promsies. What you would have would be:

AGen and AGen TP. The two would serve 2 different be desirable purposes.

@Raynos
Copy link
Contributor Author

Raynos commented Nov 6, 2013

I think we should just land an advisory section to this spec.

Saying for maximum compatibility we recommend these two asynchronies

But we should have a second AGen TP test suite!

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

3 participants