Live data from Hacker News

What .NET 10 GC changes mean for developers

roxeem.com

81–90 of 253 posts

Re: What .NET 10 GC changes mean for developers

#81

Very mixed feelings about this as there’s a strong case for the decisions made here but it also moves .NET further away from WASMGC, which makes using it in the client a complete non-starter for whole categories of web apps. It’s a missed opportunity and I can’t help but feel that if the .NET team had gotten more involved in the proposals early on then C# in the browser could have been much more viable.

How would this move .NET further away from WASMGC? This is a new GC for .NET, but doesn't add new things to the language that would make it harder to use WASMGC (nor easier).

For example, .NET has internal pointers which WASMGC's MVP can't handle. This doesn't change that so it's still a barrier to using WASMGC. At the same time, it isn't adding new language requirements that WASMGC doesn't handle - the changes are to the default GC system in .NET.

I agree it's disappointing that the .NET team wasn't able to get WASMGC's MVP to support what .NET needs. However, this change doesn't move .NET further away from WASMGC.

Re: What .NET 10 GC changes mean for developers

#82
post #5
post #3

Interesting, I mostly work in JVM, and am always impressed how much more advanced feature-wise the .NET runtime is. Won't this potentially cause stack overflows in programs that ran fine in older versions though?

I don't think the runtime is "much more advanced", the JVM has had most of these optimizations for years.

Almost none of this is in the JVM. Escape analysis is extremely limited on the standard JVM, and it's one of GraalVM's "enterprise" features. You have to pay for it.

Re: What .NET 10 GC changes mean for developers

#83
post #55

I am considering dotnet Maui for a project. On the one hand, I am worried about committing to the Microsoft ecosystem where projects like Maui have been killed in the past and Microsoft has a lot of control. Also XML… On the other hand, I’ve been seeing so many impressive technical things about dotnet itself. Has anyone here used Maui and wants to comment on their experience?

Speaking as an experienced desktop .NET Dev, we've avoided it due to years of instability and no real confidence it'll get fully adopted. We've stuck with WPF, which is certainly a bit warty, but ultimately fine. If starting fresh at this point I'd give a real look at Avalonia, seems like they've got their head on their shoulders and are in it for the long haul.

Would also recommend Avalonia. It's truly cross-platform (supports also Linux) unlike MAUI.

Re: What .NET 10 GC changes mean for developers

#84

Earlier quoted context omitted.

Attributes and reflection are still used in C# for source generators, JSON serialization, ASP.NET routing, dependency injection... The amount of code that can fail at runtime because of reflection has probably increased in modern C#. (Not from C# source generators of course, but those only made interop even worse for F#-ers).

Aye, was involved in some really messed up outages from New Relics agent libraries generating bogus byte code at runtime, absolute nightmare for the teams trying to debug it because none of the code causing the crashing existed anywhere you could easily inspect it. Replaced opaque magic from new relic with simpler OTEL, no more outages

That's likely the old emit approach. Newer source gen will actually generate source that is included in the compilation.

Re: What .NET 10 GC changes mean for developers

#85
post #44

Earlier quoted context omitted.

Lmao, functional programming is far from ergonomic

F# is hardly modern functional programming. It's more like a better python with types. And that's much more ergonomic than C#.

Python and F# are not very similar. A better comparison is OCaml. F# and OCaml are similar. They're both ML-style functional languages.

Re: What .NET 10 GC changes mean for developers

#86
post #44

Earlier quoted context omitted.

> C# is, imo, the best cross platform GC language. I really can't think of anything that comes close How about F#? Isn't F# mostly C# with better ergonomics?

Lmao, functional programming is far from ergonomic

Exactly what I've observed in practice because most devs have no background in writing functional code and will complain when asked to do so.

Passing or returning a function seems a foreign concept to many devs. They know how to use lambda expressions, but rarely write code that works this way.

We adopted ErrorOr[0] and have a rule that core code must return ErrorOr. Devs have struggled with this and continue to misunderstand how to use the result type.

[0] https://github.com/amantinband/error-or

Re: What .NET 10 GC changes mean for developers

#87
post #55

I am considering dotnet Maui for a project. On the one hand, I am worried about committing to the Microsoft ecosystem where projects like Maui have been killed in the past and Microsoft has a lot of control. Also XML… On the other hand, I’ve been seeing so many impressive technical things about dotnet itself. Has anyone here used Maui and wants to comment on their experience?

I would personally prefer Avalonia (https://avaloniaui.net/) over MAUI.

Re: What .NET 10 GC changes mean for developers

#88
post #27

A hobby audio and text analysis application I've written, with no specific concern for low level performance other than algorithmically, runs 4x as fast in .net10 vs .net8. Pretty much every optimization discussed here applies to that app. Great work, kudos to the dotnet team. C# is, imo, the best cross platform GC language. I really can't think of anything that comes close in terms of performance, features, ecosyste…

Except for F#, which also gets all the .NET10 cross-platform GC improvements for free and is a better programming language than C#.

Re: What .NET 10 GC changes mean for developers

#89
post #82
post #5

Earlier quoted context omitted.

I don't think the runtime is "much more advanced", the JVM has had most of these optimizations for years.

Almost none of this is in the JVM. Escape analysis is extremely limited on the standard JVM, and it's one of GraalVM's "enterprise" features. You have to pay for it.

> one of GraalVM's "enterprise" features. You have to pay for it.

Free for some (most?) use cases these days.

Basically enterprise edition does not exist anymore as it became the "Oracle GraalVM" with a new license.

https://www.graalvm.org/faq/

Re: What .NET 10 GC changes mean for developers

#90
post #55

I am considering dotnet Maui for a project. On the one hand, I am worried about committing to the Microsoft ecosystem where projects like Maui have been killed in the past and Microsoft has a lot of control. Also XML… On the other hand, I’ve been seeing so many impressive technical things about dotnet itself. Has anyone here used Maui and wants to comment on their experience?

I highly recommend using MvvmCross with native UIs instead of MAUI: you get your model and view model 100% cross-platform, and then build native UIs twice (with UIKit and Android SDK), binding them to the shared VM. It also works with AppKit and WinUI.

In the past it was rather painful for a solo dev to do them twice, but now Claude Code one-shots them. I just do the iOS version and tell it to repeat it on Android – in many cases 80% is done instantly.

Just in case, I have an app with half a million installs on both stores that has been running perfectly since 2018 using this ".NET with native UIs" approach.

Post reply on HN