Marcus Node Bits - Let us talk about yield and generators, shall we?
April 1, 2014
Koa Js removes the need for callbacks but still uses non-blocking code. How is that possible?
If you read the code of the last blog post you might have reported a bug or two since I was using a strange asterisk in the getGreeting-function. Is that really valid Javascript?
And when you looked very closely you might be wondering about the “yield” right there in the middle… What kind of witchcraft is this thing anyway?
These questions and more flew through my head when I first learned about Koa and the concepts it’s built upon. In this post I will try to explain that a bit and point you to other places where they explain this much better, if you don’t like my tries. This is just how I, a newbie to these concepts, have tried to wrap my head around it. Hey, let’s be completely transparent and say...
