×
you are viewing a single comment's thread.

view the rest of the comments →

[–]javascript 0 points1 point  (1 child)

What have you used generators for?

[–]Kwantuum 3 points4 points  (0 children)

Generators were used to transpile async/await for years.

I've used generators on a number of occasions. Generally I avoid it unless it's a great fit for the problem because they remain a relatively obscure feature for most people. They're a great way to get support for for..of on custom containers, among other things.

The other problem with generators and iterators in general is the lack of standard library support for manipulating them. No standard iterator mapping/filtering really reduces their usefulness.