Blog

ES6 generators introduce non-preemptive threads and solve the callback pyramid problem

At first, the idea of limiting yield to only specific class of functions seemed somewhat bizarre. I gave it five minutes, and now this design decision seems to make more sense since this restriction helps to reason about code and eliminates potential bugs. Plus, other languages have similar concepts which makes it easier for programmers to learn.

Originally posted on LinkedIn.

← Back to the blog