-
Notifications
You must be signed in to change notification settings - Fork 1
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
Comments
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... |
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. |
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! |
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.
The text was updated successfully, but these errors were encountered: