Live data from Hacker News

.NET 6 Released

devblogs.microsoft.com

211–220 of 428 posts

Re: .NET 6 Released

#211
post #34

As a relatively new engineer (~2 years FAANG experience), there seems to be a connotation around .NET. Perhaps this is indicative of the larger Microsoft ecosystem, but it feels like my peers at university and in the industry tend to stay far away from .NET for personal projects, etc. Why is this?

I can chime in on this one. I think it's very much a 'culture' thing. So, I'm a *nix guy. You know, running Sway WM, using Doom Emacs as my daily driver, that sort of a thing. Learned vim to write my thesis at night on an armchair where using the mouse was not comfortable. Not long ago I accidentally got involved with a kind of a .NET consulting gig. Rather, I got involved as a domain expert to help out some SaaS sta…

The .NET people were likely right in your case. In C# structs are allocated on the stack, that's why you'd use them. Unless you have a specific reason you'd generally keep pure data objects as classes and not structs.

And there can certainly be a culture clash, there is a bit of a tendency towards more complex patterns in the .NET world. But you don't have to do that, and MS is quite explicitly adding versions with less boilerplate in this release, if you prefer that.

Re: .NET 6 Released

#213
post #209

Earlier quoted context omitted.

I can chime in on this one. I think it's very much a 'culture' thing. So, I'm a *nix guy. You know, running Sway WM, using Doom Emacs as my daily driver, that sort of a thing. Learned vim to write my thesis at night on an armchair where using the mouse was not comfortable. Not long ago I accidentally got involved with a kind of a .NET consulting gig. Rather, I got involved as a domain expert to help out some SaaS sta…

> While writing it I needed something that would be 'just data' without any additional 'functionality' attached to it, so I naturally reached for `struct`, given that it exists in the language. The .NET guys asked why it was not a `class` instead. See, somewhere deep inside they felt that not wrapping everything in a `class` is wrong on some fundamental level. The difference between a class and a struct in C# is not…

Yes, of course, I applied 'when in Rome' a lot.

In this case though, the struct usage was completely in line with C# documentation regarding what structs are for. I wasn't trying to write C++ in C#. But hey, I do agree that code should be idiomatic to the particular community such that it doesn't feel out of place! In that case the struct did become a class.

Edit: Just re-read C# documentation on structs. Yes, it absolutely made sense to have a value type there. As in, the documentation mentions the use case almost verbatim.

Re: .NET 6 Released

#214
post #127

Earlier quoted context omitted.

>"They chased EVERY fad that could be chased. Silverlight, UPF, XAML, WPF, Islands, MAUI" Being a wise man I spared myself from this madness long time ago;) When I need Windows Desktop App I use Delphi or lately Lazarus that can do both Windows and Linux GUI from a single source and produce native standalone executables.

WinForms is still around, and works as well as it always did. That or WPF are still the sanest choices for desktop apps in .NET, IMO, so long as you're only targeting Windows. And WinForms specifically resembles VCL a lot.

I skipped .NET bandwagon for desktop completely. Comparatively to Delphi there were exactly zero business reasons for me to move my code or use .NET for new apps.

On a technical side there were no gains and numerous limitations.

Re: .NET 6 Released

#215
post #118

Earlier quoted context omitted.

> and LINQ Shudders at memories of coworkers writing giant, ridiculously inefficient LINQ queries without understanding how it's actually using the database and what it's doing server-side > Toplevel programs should make it easier to experiment with C# if you're interested. Definitely interested in that small feature :) If I had extra time I'd like to see what it takes to brew install dotnet and write a simple CLI pr…

> Can .NET deploy a static binary nowadays? You can bundle everything in a single file but that file contains the runtime, so even small Hello World apps are 50MB+ last I checked, though there have been some improvements recently with trimming and AOT is hopefully coming next year with .NET 7.

Very cool, thanks for answering. Yeah I understand they'd have to bundle the runtime so that makes sense. Glad to know they're working on improving that use case as well.

Re: .NET 6 Released

#216

We recently got through upgrading a large code base from .NET framework to .NET core 3.1. It was quite challenging as it seemed to touch every corner of .NET including AppDomains, .NET remoting, serializing type information, C++ interop which requires environment variables to be set in process (that one is very obscure), etc, etc. In any case, the performance results were really outstanding (particularly vs Mono) esp…

> In any case, the performance results were really outstanding (particularly vs Mono)

Interesting. Do you have measurement results? According to my measurements the difference is not that big, see https://www.quora.com/Is-the-Mono-CLR-really-slower-than-Cor..., especially the section Update September 15th.

Re: .NET 6 Released

#217
post #118

Earlier quoted context omitted.

> and LINQ Shudders at memories of coworkers writing giant, ridiculously inefficient LINQ queries without understanding how it's actually using the database and what it's doing server-side > Toplevel programs should make it easier to experiment with C# if you're interested. Definitely interested in that small feature :) If I had extra time I'd like to see what it takes to brew install dotnet and write a simple CLI pr…

True of nearly all ORMs really. LINQ on objects basically makes C# a very nice functional language. Dapper is arguably better for database but then use LINQ in those results is very nice.

> True of nearly all ORMs really.

I disagree in a respect. I think with an ORM it's clear when you're hitting the database, though it makes it easy to write loops over (related) rows ("n+1 problem"). I think with LINQ using the same syntax/expressions across local and remote operations it can be more blurred what's happening.

Re: .NET 6 Released

#218
post #34

As a relatively new engineer (~2 years FAANG experience), there seems to be a connotation around .NET. Perhaps this is indicative of the larger Microsoft ecosystem, but it feels like my peers at university and in the industry tend to stay far away from .NET for personal projects, etc. Why is this?

Perceived cool factor, I think. Both .NET/C# and Java are the core of Dark Matter Development [0]. They're what a huge chunk of developers and enterprise actually use but they're not cool and they don't get blogged about. Obviously the history of EEE and Windows only legacy means there's a lot of hostility to anything .NET specifically amongst a subpopulation of developers. However I don't think it sufficiently expla…

Not just "cool factor".

From your linked article: "Where are the dark matter developers? Probably getting work done. Maybe using ASP.NET 1.1 at a local municipality or small office. Maybe working at a bottling plant in Mexico in VB6. Perhaps they are writing PHP calendar applications at a large chip manufacturer"

i.e. in Cost Centers not Revenue Centers, which is to say in jobs that do not pay well, and their management is trying to figure out how to spend less money, not make more money.

Re: .NET 6 Released

#219
post #118
post #79

Earlier quoted context omitted.

C# is fast and .NET core is cross-platform. It's good for games, web, and mobile development. F# is a great functional programming language. There are fun tools like SignalR (easy websockets), Blazor (write C# and run it in the browser through WASM), and LINQ (built right into the language and allows you to query objects like a database). Toplevel programs should make it easier to experiment with C# if you're interes…

> and LINQ Shudders at memories of coworkers writing giant, ridiculously inefficient LINQ queries without understanding how it's actually using the database and what it's doing server-side > Toplevel programs should make it easier to experiment with C# if you're interested. Definitely interested in that small feature :) If I had extra time I'd like to see what it takes to brew install dotnet and write a simple CLI pr…

LINQ is best when used on in-memory object graphs, partly for the reasons you brought up, and partly because then you're not dealing with weird limitations or deviations from how functions normally work etc. For in-memory queries, it's basically just a very advanced form of sequence comprehensions.

(I also suspect that the vast majority of LINQ code in the wild is of that variety, rather than Entity Framework etc.)

Re: .NET 6 Released

#220
post #5

.NET 6 seems like a pretty good release with a few cool new features. But it's funny how the infographic in the post mentions MAUI for desktop development, but the "desktop" keyword in the text is referring to the WinForms github repository. I can't think of a more concise statement about the state of GUI development on .NET. I would really wish for less fragmentation and churn in that space.

Instead of chasing the next Microsoft fad, I've decided to try AvaloniaUI for my next graphical app. It looks mature enough now, and has a better chance of being still useful in 5 years from now than WinUI or MAUI or whatever is the latest GUI tech MS wants us to use.

Same here, I least I know this will consistent across platforms.
Post reply on HN