News for hackers. Stuff that matters.
Re:My tutorial and take on C++20 coroutines by hctaw on Monday February 22, 2021 @05:41PM (#26231663)
Yes, a tail recursive coroutine could reuse its previous frame context across yields.

With a state machine transform the `resume()` method on a coroutine is a state transformation, it doesn't necessarily know what is "forward" or "backward" in the control flow graph. There are some tricky bits though, since tail recursive functions can have multiple exits but single entries. A recursive coroutine might have multiple exits and multiple entries, so it's not always clear what is "forward" and what is "backward."

There are no comments on this comment yet.