Live data from Hacker News

.NET 8

devblogs.microsoft.com

351–360 of 374 posts

Re: .NET 8

#351
post #350

Earlier quoted context omitted.

Personally I use F# for console apps, with ahead-of-time if startup latency is important, yeah. Works fine for me! (Ahead-of-time is much harder with F# though, because .NET idiomatically leans heavily on reflection thanks to C#'s influence, and reflection is banned in AOT. C#'s workaround is source generators, which F# does not support except very unofficially. I therefore find myself stamping out boilerplate for e.…

> I therefore find myself stamping out boilerplate for e.g. JSON deserialisation more than I would like. This was my first experience while getting started in the .NET ecosystem. I wanted something similar, I wanted to build small console tools/services and F# looked cool but hit the reflection issues too soon. I mostly use crystal and golang, but both have their own issues. Hopefully F# improves with time to be full…

Luckily nowadays C# is just as terse for writing CLI apps or even terser, which does not have aforementioned issues with AOT.

Re: .NET 8

#352
post #350

Earlier quoted context omitted.

> I therefore find myself stamping out boilerplate for e.g. JSON deserialisation more than I would like. This was my first experience while getting started in the .NET ecosystem. I wanted something similar, I wanted to build small console tools/services and F# looked cool but hit the reflection issues too soon. I mostly use crystal and golang, but both have their own issues. Hopefully F# improves with time to be full…

Luckily nowadays C# is just as terse for writing CLI apps or even terser, which does not have aforementioned issues with AOT.

I'm willing to try it, I'm just waiting for a few more benchmarks regarding memory usage. Last time I checked I could only find the Benchmark Game [1] for AoT measurements, but they're from .NET 7.

Memory usage is important to me and golang is very good at that being light, but I really hate writing it for various personal reasons.

If I had more free-time I'd just simply go with Rust but you know, free time is limited :P.

[1] https://programming-language-benchmarks.vercel.app/csharp-vs...

Re: .NET 8

#353

Earlier quoted context omitted.

Microsoft seems weird tho. They dont really support any recommended way to do .NET on Mac and you have to rely on Rider or half ass VS Code experience.

What's wrong with Rider?

It's not a Microsoft tool. For a supposedly fully cross-platform language it seems pretty bad to only support first-class developer experience on Windows.

Re: .NET 8

#354
post #352

Earlier quoted context omitted.

Luckily nowadays C# is just as terse for writing CLI apps or even terser, which does not have aforementioned issues with AOT.

I'm willing to try it, I'm just waiting for a few more benchmarks regarding memory usage. Last time I checked I could only find the Benchmark Game [1] for AoT measurements, but they're from .NET 7. Memory usage is important to me and golang is very good at that being light, but I really hate writing it for various personal reasons. If I had more free-time I'd just simply go with Rust but you know, free time is limite…

BenchmarksGame is actually an interesting if unfortunate case for C#.

Many tests there are at odds with the areas of optimizations that get most engineering effort investment in .NET: high level and/or application logic and high-performance primitives like Span, Vector, etc. (with the exception of perhaps Regex-Redux, but even there I'm not sure why the results are so low, because C# has one of the fastest[0] regex engines that only loses to Intel Hyperscan, Rust one and PCRE2).

Probably the best way to go about this is to just give it a try with a sample project and see if the RAM usage is to your liking - you can get far with plain 'dotnet new console --aot' and standard library (once you're done, .NET's variant of go/cargo build is 'dotnet publish -o {output folder}').

Overall, .NET tends to have higher memory footprint than Go because its GC is designed to sustain much higher allocation rate and heaps spiking to much higher use without severely throttling performance (which Go does). But there are interesting developments with the new GC mode called DATAS. I made a very simple example project some time ago to showcase .NET's concurrency and publishing experience to someone else which shows that it now rivals Go where it's the strongest[1].

[0] https://github.com/BurntSushi/rebar#summary-of-search-time-b...

[1] https://github.com/neon-sunset/http-bench

Re: .NET 8

#355
post #25

Earlier quoted context omitted.

It's actually pretty easy if you're new to .NET. If that's the case, it's just .NET 8 and forget about everything else. .NET Core was renamed to .NET 5, which became the mainline .NET. .NET 8 is simply the latest version. .NET Standard is intended to be a common layer to help bridge between .NET Framework and .NET Core and .NET 5+. It shouldn't be used outside of that context. .NET Framework is the old, Windows-only…

Think of ".NET Standard" as "the common .NET Standard on which you can build cross-framework libraries".

It is my understanding that it isn't recommend though anymore. In that it should only be used if you really want your library used in .NET Framework. My vague recollection is that it keeps you away from some of the benefits of the modern .NET.

Re: .NET 8

#356

Earlier quoted context omitted.

Every even release is LTS (including .NET 8 today). New projects should not use Framework at all. It's really not confusing at all.

Yes, but that parent has a point: that new LTS is 3 years of support. Which is not that "long term". We're on .NET 6 now, because it's LTS. But as of today, it has 1 more year of support (1) .NET Framework 4.8 as an OS component, is actually supported for longer - no end date given (2). Note that .NET Framework 4.6.2 is supported until Jan 12, 2027 - that's longer than .NET 6 and 7, and maybe 8 1) https://learn.micro…

If you care about support, within 3 years you'll likely need to update dependencies as well which means a recompile. You might as well change your target at that time. Honestly the breaking changes have been pretty minimal lately and it's pretty trivial to upgrade.

Re: .NET 8

#357

Earlier quoted context omitted.

This is not a .NET problem. There really isn't a simple way to do cross platform (Windows/Linux/macOS) UIs with any language. The least bad option is to make it a web page, maybe wrap it with Electron.

It doesn't need to be 100% perfect. Just 99%. Don't let perfect be the enemy of great. I write Qt GUIs for Linux+Windows, and no Windows user can tell it's not "native" (not that there's a native Windows look anymore, what with MS being schizophrenic about scrapping the UI framework and starting a new one everytime a new PM wants attention, only the classic widget look associated with Windows is still the 2000/XP/7 i…

Yea, I did some Qt work in ye olden times and it's a pretty good system, although it does have its own warts mostly due to being literally older than anything else. =)

I might need to look into it once more, at least it won't run out of steam the second I want to do something else than have a standard text box or an input field on the screen - like all those "easy ui" -systems do every time.

Re: .NET 8

#358
post #153

Earlier quoted context omitted.

I don't agree with the person's suspicions, but I can speak to your question. If you're making over $1M/year or have more than 250 employees, you have to pay for Visual Studio or the C# DevKit in VS Code. Microsoft has been taking the open-core of VS Code and putting proprietary extensions into it. However, this isn't just C#. Microsoft has also replaced the open-source Python extension with something closed source.…

(perhaps downvoted by those who never had to face with realities of running OSS projects or otherwise)

Do you have some experience here? Mind sharing couple of examples - I'm quite curious

Re: .NET 8

#359
post #189

Earlier quoted context omitted.

Any tips or tutorials for a PHP dev who wants to pick .NET up after a couple decades of not using it? I looked at the project templates in Visual Studio 2022 just for web apps and the options made my head spin. My wife has worked QA for a number of .NET teams and it just seems like something I should at least keep my thumb on, but I've had nothing but frustration with it so far, even just trying to figure out what te…

PeachPie may be worth a look. It’s a php to .net compiler. https://www.peachpie.io/

Haha, cute. I'm fine coding in C#, I just haven't done any web projects in forever. Thanks, though!

Re: .NET 8

#360

Earlier quoted context omitted.

Any tips or tutorials for a PHP dev who wants to pick .NET up after a couple decades of not using it? I looked at the project templates in Visual Studio 2022 just for web apps and the options made my head spin. My wife has worked QA for a number of .NET teams and it just seems like something I should at least keep my thumb on, but I've had nothing but frustration with it so far, even just trying to figure out what te…

I'm not super familiar with PHP -- if you're looking for more of a backend focused project I'd recommend the "ASP.NET Core Web API" template. If you're looking for something that serves HTML pages, possibly the "ASP.NET Core Web App (Model-View-Controller)" template would be pretty straightforward. There's a pretty good starter tutorial for the Web API one here: https://learn.microsoft.com/en-us/aspnet/core/tutorials…

Thanks! I'll take a look at those.
Post reply on HN