First Draft: Coroutines
Sebastiaan Koppe
mail at skoppe.eu
Mon Aug 5 18:11:06 UTC 2024
On Monday, 5 August 2024 at 10:30:24 UTC, Richard (Rikki) Andrew
Cattermole wrote:
> On 05/08/2024 10:17 PM, ryuukk_ wrote:
>> C#'s async model is not an example to follow, your |Future!T|
>> is the proof
>>
>> There should be no distinction between an async/sync function
>
> I started with the position that the compiler should be able to
> do it completely transparently to the user. It failed. Too many
> holes in it. It was not implementable at all.
The only way it can work is to make all functions async and have
the compiler do an optimisation pass to turn those it can proof
into sync ones.
It is similar to the approach Go takes in that it makes calling C
functions more difficult though.
More information about the dip.development
mailing list