4 ms·
First there was APM https://learn.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/asynchronous-programming-model-apm https://learn.microso
by legulere 4y ago
First there was APM https://learn.microsoft.com/en-us/dotnet/standard/asynchronous-programming-patterns/asynchronous-programming-model-apm https://learn.microsoft.com/en-us/dotnet/standard/asynchrono... then there came TPL (using Task but without async await but ContinueWith) and finally async await with some later refinements like ValueTask. Generally you just use async await nowadays with maybe the complication of when to use Task or ValueTask
- vips7L 4y agoC# tends to have this problem with multiple ways to do the same thing. Look at construction: var a = new A(); A a = new(); A a = new A();
- schemescape 4y agoWhen did that second one get added? I haven't written C# in a while, but I don't remember seeing that one. I skimmed the C# grammar and didn't see it there either, but I only glanced and might have missed an entire section.
- vips7L 4y agoC# 9.0: https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/csharp-9#fit-and-finish-features https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/cs... I'm honestly surprised they haven't add the ability to drop the `new` keyword like Kotlin: val a = A();
- schemescape 4y agoThanks! For anyone else who’s curious, these seem to be called “Target-typed new expressions”.