|
|
|
|
|
by torginus
32 days ago
|
|
> it defensively defers execution any time it encounters one That's a (bad) JS design choice, for example C# doesn't do this. Actually I'm pretty sure even in JS, async/await gets transpiled to state machines, so I think this is easily fixable by shipping a new transpiler implementation that only defers when necessary. I get your point, but I don't think we should go back to oldschool yield-based iterators to hack around a broken implementation. |
|
I would like to see official support for `Symbol.streamIterator` and for the `for await?(item of iter)` syntax which would transpile to code like you see here (or all the way down to regenerator state machines if needed).