A high-level coroutine explanation

It's not your fault nor is it the length of your post, it was a valiant effort. As others have pointed out, you also have holes in the understanding of these fundamental "buildings blocks", which is not a jab at you but the quirky minds who thought any of this was a good idea.

Coroutines are not so much a complex feature (we use them elsewhere with extreme success) as much as they are a nerfed, half-assed mess in C++ that gives little joy or benefit to use as it stands now. But that's par for the course with C++, everything ends up being a shadow of its promised self, trying to shove stuff into the stdlib without minimally touching the language. And of course they went for the heap.

Almost concepts, almost modules, almost coroutines, almost ranges. Almost C++.

/r/cpp Thread Parent