Any D answer to C++20 coroutines?

Ola Fosheim Grøstad ola.fosheim.grostad at
Sun Jan 9 12:58:31 UTC 2022

On Sunday, 9 January 2022 at 05:28:37 UTC, Nick Sabalausky 
(Abscissa) wrote:
> From what I can tell, it sounds like C++ now has stackless 
> coroutines (ie, AIUI, a rough equivalent of both C's 
> protothreads library and C#'s internal rewrites ["lowerings"] 
> of coroutines). Now that C++ (apparently?) has it, does D 
> finally have any take on it, beyond crickets?

C++20 has it, but it is somewhat low level in the current 
incarnation, waiting for library authors go get familiar with it. 
Libraries have to be built on top if it to make it easier for the 
end user. I think we can expect some of that to be included in 

A tiny handful of people have expressed interest in it, but I am 
not aware of any work being done on this for D. All the focus 
seems to still be on "@safe", but with no willingness to change 
the language semantics. It is nice to know that giving D a 
reasonable memory management situation (without garbage 
collection) is part of the roadmap, but it is moving so slow that 
it is difficult to judge where it will end up, and when.

What D needs now is an explicit roadmap, without at roadmap 
everything that isn't already in the language gives the vibes of 
a Fata Morgana on the horizon.

A roadmap for fixing known language and runtime deficiencies 
would be a good starting point.

More information about the Digitalmars-d mailing list