Live data from Hacker News

What .NET 10 GC changes mean for developers

roxeem.com

131–140 of 253 posts

Re: What .NET 10 GC changes mean for developers

#131

Earlier quoted context omitted.

It all depends on the lens one chooses to view them. None of them are really "functional programming" in the truly modern sense, even F#. As more and more mainstream languages get pattern matching and algebraic data types (such as Python), feature lambdas and immutable values, then these languages converge. However, you don't really get the promises of functional programming such as guaranteed correct composition and…

If purity is a requirement for "real" functional programming, then OCaml or Clojure aren't functional. Regarding totality, even Haskell has partial functions and exceptions.

Both OCaml and Clojure are principled and well designed languages, but they are mostly evolutions of Lisp and ML from the 70s. That's not where functional programming is today. Both encourage a functional style, which is good. And maybe that's your definition of a "functional language". But I think that definition will get increasingly less useful over time.

Re: What .NET 10 GC changes mean for developers

#132
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 don't really understand why Microsoft didn't do a Tauri like thing for C# devs instead of this Maui stuff. It would be a tiny project in comparison and then isn't completely going against the grain like Maui is. If you want a write once / run in more places compromise, the browser already does that very well.

Maui Blazor Hybrid has a cool model where the HTML UI binds to native code (not WASM) for mobile and desktop. That is the closest you can get to Tauri-like. If you want to run that same app in a browser, then it'll use Blazor with WASM.

Re: What .NET 10 GC changes mean for developers

#133
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…

C# will be a force to reckon with if/when discriminated unions finally land as a language feature.

For me, it will be if they ever get checked errors of some sort. I don’t want to use a language with unchecked exceptions flying about everywhere. This isn't saying I want checked exceptions either, but I think if they get proper unions and then have some sort of error union type it would go a long way.

Re: What .NET 10 GC changes mean for developers

#134
post #129

Earlier quoted context omitted.

Would you rather a team move faster and be more productive or be a purist and disallow abstractions to avoid some potential runtime tracing challenges which can be mitigated with good use of OTEL and logging? I don't know about you, but I'm going to bias towards productivity and use integration tests + observability to safeguard code.

How much faster are we talking? Because you'd have to account for the time lost debugging annotations.

What are you working on that you're debugging annotations everyday? I'd say you've made a big mistake if you're doing that/you didn't read the docs and don't understand how to use the attribute.

(Of course you are also free to write C# without any of the built in frameworks and write purely explicit handling and routing)

On the other hand, we write CRUD every day so anything that saves repetition with CRUD is a gain.

Re: What .NET 10 GC changes mean for developers

#135

Earlier quoted context omitted.

I disagree on this. I am at a (YC, series C) startup that just recently made the switch from TS backend on Nest.js to C# .NET Web API[0]. It's been a progression from Express -> Nest.js -> C#. What we find is that having attributes in both Nest.js (decorators) and C# allows one part of the team to move faster and another smaller part of the team to isolate complexity. The indirection and abstraction are explicit deci…

The trade offs are though that patterns and behind the scenes source code generation is another layer that the devs who have to follow need to deal with when debugging and understanding why something isn’t working. They either spend more time understanding the bespoke things or are bottle necked relying on a team or person to help them get through those moments. It’s a trade off and one that has bit me and others bef…

I am not talking about C# specifically but also and I agree.

Implicit and magic looks nice at first but sometimes it can be annoying. I remember the first time I tried Ruby On Rails and I was looking for a piece of config.

Yes, "convention over configuration". Namely, ungreppsble and magic.

This kind of stuff must be used with a lot of care.

I usually favor explicit and, for config, plain data (usually toml).

This can be extended to hidden or non-obvious allocations and other stuff (when I work with C++).

It is better to know what is going on when you need to and burying it in a couole of layers can make things unnecessarily difficult.

Re: What .NET 10 GC changes mean for developers

#136
post #116

Earlier quoted context omitted.

> Flutter's game-like UI rendering on a canvas was confirmed to be quite a questionable approach with the whole Liquid Glass transition. Im not a flutter dev and Im very interested to hear how it doesn’t play well liquid glass.

It simply can't use it because it does not use native UIs, but instead mimics them with its own rendering engine. This approach worked to some extent during the flat minimalist era, but now that Apple has added so many new animations and transitions, reproducing them all has become close to impossible. At best, Flutter can implement some shaders for the glass'y look of the controls, but something as basic as the Liqu…

Not a single user cares about "native ui", it's only a debate among developers. Take the top 20 apps people are using, all of them use their own design system which isn't native.

Flutter will always have multiple advantages against React Native (and even Native toolkits themselves) in terms of upgradability, you can do 6 months of updates with only 30mins of work and make sure it 100% works everywhere.

The quality of the testing toolkit is also something which is still unmatched elsewhere and makes a big difference on the app reliability.

Re: What .NET 10 GC changes mean for developers

#137
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.

The JVM famously boxes everything though, probably because it was originally designed to run a dynamic language. An array list of floats is an array list of pointers. This created an entire cottage industry of alternative collections libraries with concrete array list implementations.

They're famously working on changing that. I think we're all hopeful that we'll start seeing the changes from Valhalla roll in post-25.

Re: What .NET 10 GC changes mean for developers

#138
post #76

Earlier quoted context omitted.

As polyglot developer, I also disagree. If I wanted explicitness for every little detail I would keep writing in Assembly like in the Z80, 80x86, 68000 days. Unfortunately we never got Lisp or Smalltalk mainstream, so we got to metaprogramming with what is available, and it is quite powerful when taken advantage of. Some people avoid wizard jobs, others avoid jobs where magic is looked down upon. I would also add tha…

Explicitness is different than verbosity. Often annotations and the like are abused to create a lot of accidental complexity just to not write a few keywords. In almost every lisp project you'll find that macros are not intended for reducing verbosity, they are there to define common patterns. You can have something like (define-route METHOD PATH BODY) You can then easily expect the generated code. But in Java and ot…

This is the trade-off with macros and annotation/code-generation systems.

I tend to do obvious things whwn I use this kind of tools. In fact, I try to avoid macros.

Even if configurability is not important, I favor sinplification over reuse. In case I need reuse, I go for higher order functions if I can. Macro is the last bullet.

In some circumstances like Json or serialization maybe they can be slightly abused to mark fields and such. But whole code generation can take it so far and magic that it is not worth in many circumstances IMHO, thiugh every tool has its use cases, even macros and annotations.

Re: What .NET 10 GC changes mean for developers

#139

Earlier quoted context omitted.

Explicitness is different than verbosity. Often annotations and the like are abused to create a lot of accidental complexity just to not write a few keywords. In almost every lisp project you'll find that macros are not intended for reducing verbosity, they are there to define common patterns. You can have something like (define-route METHOD PATH BODY) You can then easily expect the generated code. But in Java and ot…

This is the trade-off with macros and annotation/code-generation systems. I tend to do obvious things whwn I use this kind of tools. In fact, I try to avoid macros. Even if configurability is not important, I favor sinplification over reuse. In case I need reuse, I go for higher order functions if I can. Macro is the last bullet. In some circumstances like Json or serialization maybe they can be slightly abused to ma…

IMO, macros and such should be to improve coding UX. But using it for abstractions and the like is very much not worth it. So something like JSX (or the loop system in Common Lisp) is good. But using it for DI is often a code smell for me.

Re: What .NET 10 GC changes mean for developers

#140
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…

Or you can use the "C# without the line noise", which goes under the name of F#.
Post reply on HN