Live data from Hacker News

.NET 8

devblogs.microsoft.com

111–120 of 374 posts

Re: .NET 8

#111

I'm looking at a language to write simple executables with or without GUI and that are not too verbose or too complicated. A bit like a compiled python :) Would .NET 8 be a good challenger ? I previously didn't consider it because the compilation to binary was looking more like an experiment, and the example I've seen were quite verbose (in a java way).

Go seems like a good fit for that.

Re: .NET 8

#112
post #5

The new interceptors in C# 12 look pretty wild. Will have to play around with them. Was hoping for more of a PostSharp style AOP framework, and this doesn't appear to be that.

Yeah, interceptors via source generators is hardcore power.

Reminds me of project Manifold[1], the work they are doing is amazing eg. in-line type-safe SQL, GraphQL, etc. Mind bending, beyond next generation level stuff.

1. https://github.com/manifold-systems/manifold

Re: .NET 8

#113

I'd love to hear from some .NET fanatics, how would you convince someone to use that ecosystem over another?

Dont know about fanatic. I would use it mostly for web backends and there one important part for me has been how far one can get with very few third party dependencies. In a normal backend project it isnt uncommon to only need a handful of dependencies, most from eg microsoft namespaces. Compared to especially Node i see this as a huge security and reliability benefit

Re: .NET 8

#114
It may go under the radar of many but .NET 8 comes with DynamicPGO which is now enabled by default (improved since its earlier iterations in 6 and 7, which were opt-it).

It will help numerous abstraction-heavy codebases the most thanks to guarded devirtualization of interface/virtual calls, delegate inlining and branch reordering which has progressively more impact the more bloated code is.

Re: .NET 8

#115
post #22

Earlier quoted context omitted.

In their defence, does any other language have one, these days? The landscape hardly looks good, which is how electron et al. got so popular to begin with.

Java and Python have a few. I still don't get how electron got so popular. It's always been pretty straightforward to ship an app with a self-contained Java runtime, much the same as electron ships with v8. Java GUIs have always been worse than c++ ones, but still.. much better than electron I'd say

pySide6 has been a dream for me, it 'just works' and QT is quite robust.

I am currently fucking with Java via GraalVM, and packaging my app for distribution has been absolute hell:

jlink throws errors.

jpackage somehow gets stuck in an infinite loop that generates a directory tree of seemingly infinite depth (so deep that even Explorer can't delete it)

GraalVM native-image can't complete and throws all sorts of weird error messages

Trying to modularize the app has been hell too, it seems like every one of your dependencies needs to be modularized as well?

And like all I am using is Swing, FlatLaf, and MigLayout :(

How the hell are people getting apps running in a standalone environment?

I really like Java the language, but getting a desktop app running on it in 2023 is a nightmare.

Re: .NET 8

#116
post #13

Can I get an explanation of the relationship between .NET and Mono? I have vague memory of reading somewhere that Mono or maybe just MonoBuild was completely obsolete since everything was now open source in .NET. Does Mono still have a reason to exist? Is it all incorporated into .NET now? (btw, I still don't get why it's called .NET, and I don't know if assemblies are native code or bytecode wrapped in the same bina…

There used to be .NET Framework (which was a Windows only runtime built by Microsoft) and Mono (an open source implementation for various other platforms). In 2016 they started building .NET Core which is new open source implementation (built mostly by Microsoft) which runs on more platforms. For a while all three existed side by side. Eventually .NET Core caught up and overtook the other implementations. These days…

Actually, .NET Framework is the Python 2 of the .NET world, with all the references that it entails.

Still too many enterprise products stuck in the old ways.

Re: .NET 8

#117

I'm looking at a language to write simple executables with or without GUI and that are not too verbose or too complicated. A bit like a compiled python :) Would .NET 8 be a good challenger ? I previously didn't consider it because the compilation to binary was looking more like an experiment, and the example I've seen were quite verbose (in a java way).

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.g. JSON deserialisation more than I would like.)

Re: .NET 8

#118

Lots of very cool stuff here (AOT, Aspire, etc.). .NET has been held down by the image of its early days, but it has become a pure joy to work with recently. The improvements in tooling and ergonomics have made it a replacement for Go in our org (we migrated from .NET Core 3.1 to Go back to .NET 6 recently).

> .NET has been held down by the image of its early days, but it has become a pure joy to work with recently

People have been saying that for the past 4 years.

As someone who's never used .NET but develops embedded apps for Linux, I had high hopes for it become the best story for crossplatform development, it still feels like the crossplatform is held by ductape. It's still Xamarin for mobile, Avalonia (a 1-man project) for desktop Linux as the only choice, 2 confusing different UI frameworks (WinUI vs MAUI). They don't take this as seriously as I'd hoped.

When they made it open-source and cross-platform 6-7 years ago, they should've thrown enough manpower that within 3 years (or even 2, this is Microsoft with endless coffers) it was unquestionably the best development option for nearly every scenario.

Additionally, it's my understanding they don't release proper debuggers on Linux? I'm not gonna install Visual Studio just to debug my .NET app bro.

Re: .NET 8

#119
post #22

Earlier quoted context omitted.

In their defence, does any other language have one, these days? The landscape hardly looks good, which is how electron et al. got so popular to begin with.

Lazarus for FreePascal, write your code hit compile and get a nice EXE that starts up on Mac/Windows/Linux

I think you can always train devs, but lots of companies will avoid Lazarus/Delphi like the plague

Re: .NET 8

#120
post #51

Lots of very cool stuff here (AOT, Aspire, etc.). .NET has been held down by the image of its early days, but it has become a pure joy to work with recently. The improvements in tooling and ergonomics have made it a replacement for Go in our org (we migrated from .NET Core 3.1 to Go back to .NET 6 recently).

Big difference is that Go is stable and conservative, net core keep adding a billion features every release. Looking at some net core 2/3 stuff and now to see how many things changed. Good luck with your code base in 5 years when someone decide to add all the new stuff.

.NET / C# seems to be following C++ by including... everything. I wonder if they're just not worried about feature bloat or what's their thinking...
Post reply on HN