Live data from Hacker News

.NET 10

devblogs.microsoft.com

361–370 of 605 posts

Re: .NET 10

#361

Earlier quoted context omitted.

Where is this worry coming from? (I'm curious, not shutting it down) I might be biased from having worked with production F#, but it feels more like functional is making its way into C#, as the general industry sees value in functional principles. So F# feels like its more here to stay?

Doesn't it feel like the functional stuff is coming into C# so that F# can disappear? Pure speculation on my part but doesn't seem unreasonable.

The C# team admits to looking at how F# features work, but also keeps trying to make it clear that C# doesn't have a goal of entire eating F#.

C# still doesn't see itself as a functional programming language, even as it has added so many features. It may never get first-class currying or the broader ideas like generalized computation expressions, for instance. It certainly won't get F#'s cleaner syntax with fewer mandatory semicolons and whitespace nesting rather than curly brackets.

F# probably isn't going to disappear for a lot of similar reasons that GHC (the Glasgow Haskell Compiler) didn't disappear when F# was started (nor when key contributors left Microsoft). F# often already sees more outside open source contributors than contributions from Microsoft employees.

Re: .NET 10

#362
post #282
post #174

Earlier quoted context omitted.

Most of that ecosystem is language agnostic, or offer much more ergonomically sane APIs in dotnet. This is especially true for anything coming out of Google (e.g. Dataflow which runs on top of Apache Beam). C# itself has way better DX (object initializers alone are worth the switch), and most language features don't feel bolted on like with Java (anything from functional programming to extension methods to whatever).…

> and most language features don't feel bolted on like with Java (anything from functional programming to extension methods to whatever) Java doesn't have extension methods and while both are decent languages, C# is the one that likes implementing every conceivable language feature immediately, while Java takes a while to design a bigger feature that will replace several smaller ones' use cases.

> while Java takes a while to design a bigger feature that will replace several smaller ones' use cases.

Java is quite busy also implementing features that are small in other languages like text blocks.

And I wish Java would design bigger features that would replace several "smaller ones", but that is almost never the case. It's almost always just a new big feature bolted on to the language that is almost there, but not quite

There are many reasons for that, none of them simple, and it doesn't help that there's also the attitude of "those lesser languages cannot compare to the greatness that is Java" [1]

If we're talking about Java, somehow you're still required to do builder patterns and manually create `.of` constructors for everything. Where C# has had object initialisers and pervasive IEnumerable with a very simple interface that nearly everything uses. And that is only scratching the surface of DX.

Almost every feature bolted onto Java seems to take several times more code, and doesn't really work with the rest of the language.

Don't get me wrong, I quite like working with modern Java. But I had the chance to work at a company where micro services where developed in both Java and C#, and the difference is still light and day.

[1] https://news.ycombinator.com/item?id=28985688 "our goal isn't to adopt the strategy of less successful products, but to forge our own"

Re: .NET 10

#363

I've worked with .NET for over 10 years and we built our startup on top of it. Here are my thoughts: Pros: * Stability * Very decent standard library * Good balance between productivity and robustness * Great package management * Extremely easy to upgrade, so essentially free goodies (performance) every year or so Cons: * Very MSFT dominated (obviously) * Subpar tooling outside of Windows (I'm looking at you C# Dev K…

Why is EF regarded as such a good ORM? I've encountered countless bugs in different repos related to its stateful nature after many years in .NET. Personally I found it completely illogical for my ORM to maintain state. I just want it to hold my schema and build queries.

Are you referring to the change tracker? FYI you can have it skip tracking as the default (or per query), but when you actually want to make changes you better opt in with `.AsTracking()`.

Anyway, I've used EF at work for about a decade and I'm happy with it. I surely have blind spots since I haven't used other ORMs in that time, but some things I like are:

- Convenient definition of schema.

- Nice handling of migrations.

- LINQ integration

- Decent and improving support for interceptors, type converters and other things to tailor it to our use cases.

What ORM do you prefer, and how does it differ by being stateless? How does saving look like, for example?

Re: .NET 10

#364
post #2

For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%. We were even able to downgrade our cloud servers to smaller instances, literally. I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

I was somewhat recently attempting to help my manager get a C# dev environment set up. He was used to doing everything the C/Java/JavaScript/Python/almost-every-language-under-the-sun way, and avoiding the "Microsoft way" of doing things created so many roadblocks. I had no idea that over the previous ~20 years I had been practicing a C# compiler summoning ritual and had become incredibly good at it. From the start I…

Just install the .NET SDK, and you’re ready to go.

> Nuget is complete and utter garbage. You still have to resort to all forms of unreliable hacks in order to redirect it to a locally clone

How so, you can use a nuget.config in your project and use your local packages fairly easy, seems in part with npm and the likes.

Re: .NET 10

#365
post #319
post #2

For us, every .NET upgrade since .NET 5 has gone surprisingly smoothly and reduced CPU/RAM usage by 10–15%. We were even able to downgrade our cloud servers to smaller instances, literally. I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma.

> I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma There are plenty of real issues that are not the enterprise stigma. I built a backend web api this year with it and C# is fantastic. EF Core is truly one of the best ORMs I've ever used. That said, I regret that decision and won't be using it again for any new projects. Honestly it looks like Microsoft is distracted and…

>Everywhere you look there are tons of half baked projects like Blazor

We used Blazor years ago and it worked flawlessly already then. Hard to believe it's worse today. And what's wrong with Identity?

>progress in .NET is super slow

Compared to what?

Re: .NET 10

#366

Earlier quoted context omitted.

The go-to nowadays is System.Text.Json, developed by the same person as Newtonsoft.Json, built in to .NET. Newtonsoft.Json as the primary JSON serializer (at least in every place I've worked) has NOT been the case versus System.Text.Json for years. Though it certainly used to be the case.

Uh okay! I was not aware of this. Thanks for pointing that out. Why is there so much difference in the NuGet downloads between both libraries tho?

System.Text.Json is out-of-the-box in .NET > 5. The NuGet package is primarily a compatibility layer for people still supporting .NET 4.x for whatever reason.

Re: .NET 10

#367
post #352
post #300

Earlier quoted context omitted.

9 isn't an LTS version... always go with an LTS version.

That's... a strong statement. There is absolutely nothing wrong with going with a non-LTS version. You just have to update a little bit sooner, and that's it.

Especially with the recent extension of STS release support from 18 to 24 months [1]. Previously, upgrading from an LTS version to the next major (STS) version meant the support window decreased by half a year, while now it would stay the same.

[1] https://devblogs.microsoft.com/dotnet/dotnet-sts-releases-su...

Re: .NET 10

#368

Earlier quoted context omitted.

What's wrong with System.Text.Json?

Last I checked they stubbornly insisted on reinventing the wheel and ignoring everything in System.Runtime.Serialization so you had to redecorate everything with their new attributes. For example https://github.com/dotnet/runtime/issues/29975 . So we stuck with Newtonsoft for the time being.

There is a 3rd Party library for that now: https://github.com/zcsizmadia/ZCS.DataContractResolver

I haven't tried it because it has generally seemed easiest to use the new attributes. Though a large part of that is the shift from the WCF-era "opt-in" approach of DataContract/DataMember [0] versus the "opt-out" JsonIgnore approach where most of the transition is deleting lines because JsonIgnore is the exception rather than the rule. You could even keep DataContract/DataMember during the transition and just take an additive approach for JsonIgnore.

[0]: It was a good idea, in theory, but so annoying in practice.

Re: .NET 10

#369

Earlier quoted context omitted.

Easy to avoid depending on the area; I'd urge you not to be discouraged by the presence of commercial libraries. They aren't as vital as it may seem from the outside. I've been a full-time C# developer since the first open beta and I have only one (1) instance where I used a commercial library. That was 2002 and if we were doing it today, we wouldn't have needed that commercial library. I have never used a commercial…

[flagged]

Come on, it's clear he meant "commercial libraries not in the default Microsoft SDK".

Re: .NET 10

#370
post #261

Every time I read about new .NET version improvements I always remember my attempt to get a job using this stack in my local job market (Greece), where .NET Framework is super prevalent, majorly used by classic companies that don't even give you a fair technical chance if you lack a degree, and the devs are considered to be a cost center. I really, REALLY wish I was in another timeline where I could say in an intervi…

Somehow, .NET jobs seem be tied to waterfall processes ("but we are still agile, because we release two times a year"), requirements in OneNote, and a 5 kg Windows laptop.

What an absolute load of bullshit.
Post reply on HN