←back to thread

.NET 10

(devblogs.microsoft.com)
484 points runesoerensen | 4 comments | | HN request time: 0s | source
Show context
jitbit ◴[] No.45888669[source]
For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%.

We were even able to downgrade our cloud servers to smaller instances, literally.

I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

replies(26): >>45888799 #>>45888804 #>>45889332 #>>45891939 #>>45896032 #>>45898279 #>>45898305 #>>45898358 #>>45898503 #>>45898877 #>>45899062 #>>45899235 #>>45899246 #>>45899326 #>>45899445 #>>45899481 #>>45899858 #>>45900544 #>>45900791 #>>45900829 #>>45903218 #>>45904345 #>>45904435 #>>45905041 #>>45906073 #>>45907122 #
olavgg ◴[] No.45898305[source]
As a startup, what is it in for me to switch from Java, Spring Boot, Hibernate, Beam, Flink, Pulsar, Vault, KeyCloak ecosystem to C#.Net? Is the documentation better? Do I get better performance? Is the community larger and more stable?
replies(4): >>45898404 #>>45898520 #>>45899801 #>>45900264 #
troupo ◴[] No.45899801[source]
Most of that ecosystem is language agnostic, or offer much more ergonomically sane APIs in dotnet. This is especially true for anything coming out of Google (e.g. Dataflow which runs on top of Apache Beam).

C# itself has way better DX (object initializers alone are worth the switch), and most language features don't feel bolted on like with Java (anything from functional programming to extension methods to whatever).

And at least 6 years ago .net with default settings required significantly less resources (RAM, CPU) and yad significantly faster startup than comparable Java code.

C# is also significantly more consistent. You might not use LINQ, but since everything is IEnumerable, you will use the same set of methods on everything. None of the Lis.of...Collectors.collect idiocy from Java.

I also found Asp.net to have significantly less undebuggable magic than Spring.

replies(2): >>45900211 #>>45902190 #
1. gf000 ◴[] No.45902190{3}[source]
> and most language features don't feel bolted on like with Java (anything from functional programming to extension methods to whatever)

Java doesn't have extension methods and while both are decent languages, C# is the one that likes implementing every conceivable language feature immediately, while Java takes a while to design a bigger feature that will replace several smaller ones' use cases.

replies(1): >>45905761 #
2. troupo ◴[] No.45905761[source]
> while Java takes a while to design a bigger feature that will replace several smaller ones' use cases.

Java is quite busy also implementing features that are small in other languages like text blocks.

And I wish Java would design bigger features that would replace several "smaller ones", but that is almost never the case. It's almost always just a new big feature bolted on to the language that is almost there, but not quite

There are many reasons for that, none of them simple, and it doesn't help that there's also the attitude of "those lesser languages cannot compare to the greatness that is Java" [1]

If we're talking about Java, somehow you're still required to do builder patterns and manually create `.of` constructors for everything. Where C# has had object initialisers and pervasive IEnumerable with a very simple interface that nearly everything uses. And that is only scratching the surface of DX.

Almost every feature bolted onto Java seems to take several times more code, and doesn't really work with the rest of the language.

Don't get me wrong, I quite like working with modern Java. But I had the chance to work at a company where micro services where developed in both Java and C#, and the difference is still light and day.

[1] https://news.ycombinator.com/item?id=28985688 "our goal isn't to adopt the strategy of less successful products, but to forge our own"

replies(2): >>45907803 #>>45907828 #
3. gf000 ◴[] No.45907803[source]
> Java is quite busy also implementing features that are small in other languages like text blocks.

It's a small feature which is immediately understandable by anyone coming straight from Java 1.2, it doesn't materially increase the complexity of the language and is arguably one of the best implementation among different languages. So not really sure if it's a good counterpoint.

Meanwhile records arrived several versions ago with sealed interfaces/classes on the horizon already, so now they together form a complete ADT feature. Pattern matching builds on top. And sure, these are no novel features, MLs had this decades ago, but the implementation is very nice, with minimal additional developer complexity and some small DX improvement (records replace the majority of Bean usages). In the future, withers may come that would help with both object initialization AND record "mutation". Where Java spends more development budget is on the runtime side, e.g. virtual threads can replace async code in many cases, so the language doesn't have to get all the complexity of an async feature.

Meanwhile C# has many many "one-off" features and they really can have unexpected interactions and make the language quite a bit harder to understand. Some of them are absolutely wonderful, but I am on a "the-smaller-the-merrier" language team.

4. vips7L ◴[] No.45907828[source]
> Java is quite busy also implementing features that are small in other languages like text blocks.

Or named parameters or compile time null safety. Everyday I inch closer to moving over to C# from Java.