Open jedwards1211 opened 1 year ago
Yes please! I just came here to look for documentation of this feature, and this is exactly what I want to see.
The current syntax for using generators in-place is really cumbersome, and something like do*
will make it much easier to use
This is especially nice when combining multiple generators.
for (const v of do * {
yield* foo();
yield* bar();
}) {
// v
}
I wrote code like this today:
This is a pretty nice pattern but IIFEs always feel messy. I realized, a
do *
syntax would make this pattern more elegant: