←back to thread

.NET 10

(devblogs.microsoft.com)
489 points runesoerensen | 5 comments | | HN request time: 0.643s | source
Show context
thiago_fm ◴[] No.45898436[source]
Changed from Ruby to .NET and loving it.

C# is a great language, it's now very modern and has the best parts of Typescript, while leaving out the bad ones.

It's also extremely fast and multi-platform.

It also doesn't have the fragmentation that Java or JVM langs has.

And it's also open source nowadays. I think Sillicon Valley hasn't caught up with those recent changes, I bet more startups would be using C# if they knew.

replies(2): >>45899085 #>>45902527 #
1. dahauns ◴[] No.45899085[source]
>and has the best parts of Typescript

I really like C#, but I wouldn't go that far - unions are at least on the horizon, but I've sometimes come to miss the power and flexibility of TS's structural typing...(And so has Hejlsberg, apparently, seeing his reasoning for choosing go over C# for tsc :) )

replies(3): >>45901079 #>>45903991 #>>45905533 #
2. thiago_fm ◴[] No.45901079[source]
Might be my own taste, but except a few of the common and easy to understand structural typing code, I find it sometimes actually make things needlessly complex.

I also write lots of Typescript, and the furthest I go is to use 'Omit' and other utility types, but already feel like it's too much.

replies(1): >>45903199 #
3. Timon3 ◴[] No.45903199[source]
I've come to really appreciate Typescripts structural typing, because it reduces some of the overhead & prevents the unnecessarily tight coupling that has often annoyed me in other languages.

The overhead argument seems fairly objective to me - clean code with low coupling in C# et al. requires separate definitions of interfaces and implementations, explicit conversion methods between compatible interfaces etc. This adds up over time and makes refactoring pretty annoying.

The tight coupling happens when people don't bother to define interfaces. Suddenly I have to couple class hierarchy to classes from unrelated modules, all so the compiler is happy when I pass structurally equivalent data. To keep my own modules clean I have to add yet more interfaces, conversion methods etc!

replies(1): >>45907515 #
4. vips7L ◴[] No.45903991[source]
I hope once they introduce unions, they also introduce some sort of error union.
5. mrsmrtss ◴[] No.45905533[source]
>And so has Hejlsberg, apparently, seeing his reasoning for choosing go over C# for tsc

It was more related to the fact that the existing TS code was more easily ported to Go, and also .NET AOT wasn't mature enough at that time. Structural typing has its own problems. I'm personally not a big fan of it.