-
Notifications
You must be signed in to change notification settings - Fork 14
Description
I've been reading through docs, and
https://develop.capy.cpp.al/capy/cpp20-coroutines/syntax.html has a "What the Compiler Transforms" section
that promises to show "how the compiler transforms a coroutine into a regular function".
The problem is the code example still uses coroutine keywords, which makes it confusing. I think what the example is actually doing is showing what the coroutine would look like if the promise implicit steps were made explicit.
This section could be improved by clarifying the intent, showing the actual transformation, or a two-step explanation. I would suggest a two-step explanation because this is not a good section to explain these implicit steps (the docs say promises will be explained later), and because
the actual transformation without the implicit steps would be hard to understand. The actual transformation would probably be a resumable functor rather than a function, though.
The rest of the "Introduction To C++20 Coroutines" looks great, though. The section hierarchy is really good.