3 ms·
I'm really hoping async iterators [1] will make it to stage 4, but from the github I can't really tell what's holding it back as it has several browsers with im
by johnsonjo 9y ago
I'm really hoping async iterators [1] will make it to stage 4, but from the github I can't really tell what's holding it back as it has several browsers with implementation (I know that's not the only requirement for stage 4, but it's one of them.) I also noticed it's not on the agenda for the November meeting [2]. I understand there are a lot of features being worked on concurrently so it may not be finished by ES2018, but is there any chance someone could give me an update on what's happening with it. I just think this feature is amazing! And also thanks TC39 for all the great features coming to ECMAScript!
[1]: https://github.com/tc39/proposal-async-iteration https://github.com/tc39/proposal-async-iteration
[2]: https://github.com/tc39/agendas/blob/master/2017/11.md https://github.com/tc39/agendas/blob/master/2017/11.md
- always_good 9y agoAsync iterators will be cool. Since Java blocks, you can implement a crawler as a custom iterator that makes API requests / paginates behind the scenes and thus abstracts away the fact that it's making a series of requests since the callsite just iterates over the values as it finds them. Would be nice to have that sort of abstraction in Node.
- hdhzy 9y ago> you can implement a crawler as a custom iterator that makes API requests / paginates behind the scenes and thus abstracts away the fact that it's making a series of requests since the callsite just iterates over the values as it finds them. Yep, that's what I had built when they were announced. I had an API that returned a page and "next" pointer but the iterator just returned next item (promise) and followed next links, for the API consumer it looked like a regular collection. Pretty nice! > Would be nice to have that sort of abstraction in Node. Unfortunately Node APIs will probably always lag behind because it's hard to rewrite everything using Promises...