Remix.run Logo
twoodfin 4 hours ago

As the author lays out, the thing that made coroutines click for me was the isomorphism with state machine-driven control flow.

That’s similar to most of what makes C++ tick: There’s no deep magic, it’s “just” type-checked syntactic sugar for code patterns you could already implement in C.

(Occurs to me that the exceptions to this … like exceptions, overloads, and context-dependent lookup … are where C++ has struggled to manage its own complexity.)

HarHarVeryFunny 4 hours ago | parent [-]

If you need to implement an async state machine, couldn't that just as easily be done with std::future? How do coroutines make this cleaner/better?