The forked elephant in the room

ikod igor.khasilev at gmail.com
Tue Jan 16 09:54:42 UTC 2024


Hello,


On Tuesday, 16 January 2024 at 06:38:16 UTC, Richard (Rikki) 
Andrew Cattermole wrote:
> On 16/01/2024 3:25 PM, Mike Shah wrote:
>> (As an aside, my Ph.D. work was in Java doing some concurrency 
>> studies on performance -- so eventually I'd like to do more 
>> research work in D on this topic)
>

> What is very interesting is that in D, as long as a function is 
> being compiled the compiler could slice and dice it into a 
> coroutine object (such as a closure) without needing to be 
> annotated as such explicitly.

In Rust compiler convert `async` code into state machine with 
context.

>
> It could be done implicitly upon the library struct that 
> represents the language coroutine constructor.
>
> No async/await, no writing for asynchronously, just 
> sequentially.
>

I'd start from defining event loop API to decouple interface from 
implementations.


More information about the Digitalmars-d mailing list