Re:Rust Is a Scalable Language
by schemescape on Tuesday March 28, 2023 @09:10PM
(#35350660)
What is there besides Task<T>?
[ Parent
| on HN ]
First there was 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
C# 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();
Re:Rust Is a Scalable Language
by schemescape on Wednesday March 29, 2023 @06:09PM
(#35364534)
When 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.
C# 9.0: 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();
Re:Rust Is a Scalable Language
by schemescape on Wednesday March 29, 2023 @09:17PM
(#35366434)
For anyone else who’s curious, these seem to be called “Target-typed new expressions”.