Live data from Hacker News

What .NET 10 GC changes mean for developers

roxeem.com

201–210 of 253 posts

Re: What .NET 10 GC changes mean for developers

#201

Earlier quoted context omitted.

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.

What is an example of a real functional language for you?

I, too, am curious and keep checking back for a reply!

Re: What .NET 10 GC changes mean for developers

#202
post #200
post #45

Earlier quoted context omitted.

Having worked with C# professionally for a decade, going through the changes with LINQ, async/await, Roslyn, and the rise of .NET Core, to .NET Core becoming .NET, I disagree. I certainly think that C# is a great tool and that it’s the best it has ever been. It’s also relies on very implicit behaviour, it is build upon OOP design principles and a bunch of “needless” abstraction. Things I personally have come to view…

I have been coding in C# for 16 years and I have no idea what you mean by "hidden indirection and runtime magic". Maybe it's just invisible to me at this point, but GC is literally the only "invisible magic" I can think of that's core to the language. And I agree that college-level OOP principles are an anti-pattern; stop doing them. C# does not force you to do that at all, except very lightly in some frameworks wher…

Hidden indirection & runtime magic almost always refer to DI frameworks.

Reflection is what makes DI feel like "magic". Type signatures don't mean much in reflection-heavy codes. Newcomers won't know many DI framework implicit behaviors & conventions until either they shoot themself in their foot or get RTFM'd.

My pet theory is this kind of "magic" is what makes some people like Golang, which favors explicit wiring over implicit DI framework magic.

  > Just don't write bad code
Reminds me with C advices: "Just don't write memory leaks & UAF!".

Re: What .NET 10 GC changes mean for developers

#203
post #200
post #45

Earlier quoted context omitted.

Having worked with C# professionally for a decade, going through the changes with LINQ, async/await, Roslyn, and the rise of .NET Core, to .NET Core becoming .NET, I disagree. I certainly think that C# is a great tool and that it’s the best it has ever been. It’s also relies on very implicit behaviour, it is build upon OOP design principles and a bunch of “needless” abstraction. Things I personally have come to view…

I have been coding in C# for 16 years and I have no idea what you mean by "hidden indirection and runtime magic". Maybe it's just invisible to me at this point, but GC is literally the only "invisible magic" I can think of that's core to the language. And I agree that college-level OOP principles are an anti-pattern; stop doing them. C# does not force you to do that at all, except very lightly in some frameworks wher…

Some examples:

- Attributes can do a lot of magic that is not always obvious or well documented.

- ASP.NET pipeline.

- Source generators.

I love C#, but I have to admit we could have done with less “magic” in cases like these.

Re: What .NET 10 GC changes mean for developers

#204

Earlier quoted context omitted.

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

I think people who last looked at C# 10 years ago or haven't adapted to new language features seriously don't know how good C# is these days. Switch expressions with pattern matching are absolutely killer[0] for its terseness. Also, it is possible to use OneOf[1] and Dunet[2] to get access to DU [0] https://timdeschryver.dev/blog/pattern-matching-examples-in-... [1] https://github.com/mcintyre321/OneOf [2] https://gi…

> OneOf

I do like/respect C# but come on now. I know they're fixing it but the rest of the language was designed the same way and thus still has this vestigial layer of OOP-hubris

Re: What .NET 10 GC changes mean for developers

#205

Earlier quoted context omitted.

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.

What is an example of a real functional language for you?

Haskell. But there are other examples of "pure functional programming". And the state of the art is dependently typed languages, which are essentially theorem provers but can be used to extract working code.

Re: What .NET 10 GC changes mean for developers

#206

Do these updates mean that the JIT can finally optimize LINQ away into simple loops?

LINQ doesn't need the JIT for that. I don't even think it is the JIT's responsibility to be aware of a specific library and optimize for it. LINQ does a lot of work behind the scene to optimize for speed and reduce allocations. An example can be found here [1]. These optimizations are mostly about reducing the various LINQ patterns into simple for loops. [1] https://github.com/dotnet/runtime/blob/main/src/libraries/S…

Without JIT support, using Linq involves at least allocating an IEnumerator object on the heap, and a closure object, and a delegate to it (if said delegate captures local vars). Each call to `Select` or `Where` is also a virtual call.

This is hugely expensive compared to just a for loop. With this update it seems like the JIT can do escape analysis to stack-allocate the closure object, and the delegate as well (it could devirtualize calls even before that). It seems like it has everything to optimize away the whole LINQ overhead, though I'm not sure what happens in practice.

It'd be neat since that was a major argument against actually using LINQ in perf-sensitive code.

Re: What .NET 10 GC changes mean for developers

#207
post #79

Earlier quoted context omitted.

Currently you can get around this with Panama, even if the API is kind of verbose for the purpose. Eventually value classes might close the gap, finally available as EA.

Valhalla is over 10 years in the works already and there is still no clear date when or if at all it would be released. It's very difficult to change (or fix) such fundamental things so late in the game.

Because it is a huge engineering effort to add value types without breaking existing binary libraries.

Doing a Python 3 would mean no one wanted going to adopt it.

Yes it is long process.

Some of the JEP in the last versions are the initial baby steps for integration.

Re: What .NET 10 GC changes mean for developers

#208
post #174
post #167

Earlier quoted context omitted.

28% of new iOS apps are made with flutter and it's the #1 cross platform framework on stack overflow 2024 survey so I highly doubt it has flatlined. https://flutter.dev/multi-platform/ios https://survey.stackoverflow.co/2024/technology#1-other-fram...

All those stats look great on paper, but a few months ago I checked job postings for different mobile frameworks, and Flutter listings were 2-3 times fewer than RN. Go on Indeed and see for yourself. For a "28% of new iOS apps", the Flutter subreddit is a ghost town with regular "is it dying? should I pick RN?" posts. I just don't buy the numbers because I'm myself in a rather stagnant cross-platform ecosystem, so I…

Maybe you are just not in the target market? I just checked FlutterShark and I have 14 apps installed with flutter in it.

Flutter is starting to become the default framework to build apps in in Asia at least.

And I disagree about the LLM, Flutter provides strong standardisation and strong typing which make it an ideal target for LLM.

As for Kotlin Multiplatform, maybe it will take off similarly as Flutter but that hasn't happened yet.

Re: What .NET 10 GC changes mean for developers

#209
post #101

I wonder if this makes .net competitive for high frequency trading...

Why would you ever pick a language like this for HFT? It seems like a nonstarter for me but I guess Java is out there in use

"Why we chose Java for our High-Frequency Trading application"

https://medium.com/@jadsarmo/why-we-chose-java-for-our-high-...

Re: What .NET 10 GC changes mean for developers

#210

Earlier quoted context omitted.

What is an example of a real functional language for you?

Haskell. But there are other examples of "pure functional programming". And the state of the art is dependently typed languages, which are essentially theorem provers but can be used to extract working code.

Like LEAN4 ?
Post reply on HN