-
Notifications
You must be signed in to change notification settings - Fork 2k
Closed
Labels
Description
Asynchronous iterators are increasingly well-supported. Should CoffeeScript 2 provide first-class support for them?
This would require supporting an additional for syntax corresponding to for await … of in JavaScript. Perhaps CoffeeScript can add for await … from?
The problem here is analogous to the problem that inspired for … from—namely, you cannot use for loops naturally with async iterators otherwise.
In addition, it would require allowing functions that contain both await and yield and generating async function* declarations, aka async generator functions.