async / await

Imperatorn johan_forsberg_86 at hotmail.com
Fri Oct 8 11:14:54 UTC 2021


On Thursday, 7 October 2021 at 12:47:16 UTC, Imperatorn wrote:
> 1. What are the hurdles to overcome to enable the async / await 
> keywords in D?
>
> Would make the porting process from C# to D much easier and 
> also shorten a lot of code.
>
> 2. Is there something similar to C# Task 
> (https://docs.microsoft.com/en-us/dotnet/api/system.threading.tasks.task?view=net-5.0) in D?
>
> Would make the porting process from C# to D even easier.
>
> I began making a list of corresponding language constructs 
> between C# and D and you can get pretty far without doing much 
> work. But then there's that async stuff...
>
> There's a lot of C# out there waiting to become D 🍀

If not integrated in the language via keywords, how could one 
accomplish it using the "keywords" anyway? Could udas be used? 
@async @await?

Could "compile time magic" lower to something?

I find it hard to believe that it would be *impossible* since D 
is one of the most plastic statically typed languages I know.


More information about the Digitalmars-d mailing list