Live data from Hacker News

.NET 10

devblogs.microsoft.com

381–390 of 605 posts

Re: .NET 10

#381

Earlier quoted context omitted.

Yea, this is "enterprise" development 101. The fact that large companies pick an established tech over newer ones isn't about .NET/C# per se, it's about large companies and the way they work.

And from the company's perspective, that's the right way to operate. Sure, it sucks for the individual hacker-type, but a big enterprise doesn't want "move fast, break things" they want the opposite. Rigidity, proven processes, stability and backwards compatibility. Working there you aren't building the next Google, you're probably maintaining a some 20 year old order-to-cash ERP process that's boring, but critically…

> And from the company's perspective, that's the right way to operate.

Oh absolutely. It's a business decision. It just so happens that it's framework that has been around awhile and has a decent bit of support. Give Node another 10 years and that landscape might start to change.

Re: .NET 10

#382

Earlier quoted context omitted.

> I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma. I tried .NET and liked C# as a language. But even though the language and runtime are now open source, it seemed like a lot of the recommended libraries were still commercially licensed, which was an immediate nope from me. I've never encountered that in any other ecosystem.

What libraries are you referring to? I really haven't used any commercial libraries at all since the .Net Core transition (and .Net 5+ as a result). Are you looking at older materials?

Just one example, but when I was running a .Net dev team we licensed the Telerik UI components. We ended up dropping them, but not until we had initiated a migration to Java/PG instead of C#/MSSQL. After we moved to Java everything standardized of a set of FOSS libraries for various things.

Re: .NET 10

#383

Earlier quoted context omitted.

Moq, lots of PDF libraries, Avalonia, Automapper, MediatR, MassTransit,Telerik stuff,etc. I'm not inherently against it, we have a problem with opensource being asymmetrically underfunded and if people going commercial is the cost perhaps we've failed.

Avalonia is FOSS (MIT licensed). You only need Avalonia XPF if you are migrating legacy stuff. Moq is largely unnecessary today with LLMs being able to easily generate mock classes. I personally prefer to hand-roll my mocks, but if you prefer the Moq-like approach, there's NSubstitute (3-BSD). Automapper and MediatR are both libraries I avoided prior to the license change anyways, because I don't like runtime "magic"…

I agree with almost all of this, especially MediatR being nonsense, but I would recommend against using a LLM to generate a mock. That’s just more code that you need to maintain and update on every interface change. NSubstitute is a fine library.

Another popular library that went commercial is FluentAssertions, Shouldly is a good open-source alternative.

Re: .NET 10

#384

Earlier quoted context omitted.

> I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma. I tried .NET and liked C# as a language. But even though the language and runtime are now open source, it seemed like a lot of the recommended libraries were still commercially licensed, which was an immediate nope from me. I've never encountered that in any other ecosystem.

Silly question. If you want the C# experience but more community/OSS driven… why not Java?

C# 1.0 was pretty much Microsoft Java, but since then, C# has evolved into its own, more powerful thing, while Java has stayed much more conservative over the years.

Re: .NET 10

#385

Earlier quoted context omitted.

And .NET is the language of choice for "Enterprise". So that's what the majority of jobs are. Where as large 'tech' companies don't tend to be like this.

> And .NET is the language of choice for "Enterprise". So that's what the majority of jobs are. Disagree. I would argue Java is more of a choice for "Enterprise". Also, would you please define the scope of "enterprise". If you mean "enterprise" as someone who want consistent and predictable management and productivity, then sure .NET is "enterprisy", because instead of a dragon they want a fossil. But if you mean "en…

> I would argue Java is more of a choice for "Enterprise".

.NET was literally created to replace the Java enterprise ecosystem. It never managed to completely displace it, but effectively gained around half of the enterprise market - and it will take more and more, after Oracle started pulling their usual boa-constrictor moves. C# is as "enterprisey" as they come, and it went full-opensource only once it became a requirement even in the enterprise.

Re: .NET 10

#386

Earlier quoted context omitted.

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.

"Just" is an incredibly obnoxious word when used in the way that you have.

> Just install

Not on Debian? Have fun with that. You'll also need the Azure SDK. And what about openssl-dev? Oh no, you installed dotnet on Windows instead of within WSL? Start again.

No, you don't "just install" the SDK. There is a lot that the IDEs set up for you.

> Local nuget.config

I don't see how adding a nuget config improves anything. You have completely omitted what you place inside of it to make it build and use a local clone of the package source.

Look at all this nonsense that people have resorted to: https://stackoverflow.com/questions/32482746/how-to-temporar...

Re: .NET 10

#387

Earlier quoted context omitted.

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…

Isn't it just a single file installation?

No. It's a tar + some config envars if you need to do it manually.

Re: .NET 10

#388

Earlier quoted context omitted.

> I wish .NET was more popular among startups, if only C# could get rid of the "enterpisey" stigma. I tried .NET and liked C# as a language. But even though the language and runtime are now open source, it seemed like a lot of the recommended libraries were still commercially licensed, which was an immediate nope from me. I've never encountered that in any other ecosystem.

Silly question. If you want the C# experience but more community/OSS driven… why not Java?

I wouldn't call this a silly question at all. But having recently converted my intro data structures course from Java to C#, I can talk about why C# might be better. I have programmed regularly in both languages for the last 15 or so years (in addition to regularly programming in TypeScript, Scala, and F#).

Java is fast and reasonably safe. It has a lot of software (especially OSS) software. Its package system (Maven and the like) is ok, but not great. The language occasionally gets new features, but change is slow.

To a first approximation, C# is a lot like Java, so it is relatively easy to switch. But C# is, hands down, a better language. The most obvious thing that a developer might notice that that C# does not force you to be extremely verbose like Java, although you can code in the Java style if you like.

Having switched my course from Java to C#, the most obvious "win" was the fact that, every lecture, I would delete some slides that explained painful Java corner cases to students. For example, Java's implementation of generics. Boxed types are necessary, and explaining them to students who have never seen any form of polymorphism before is difficult. After an entire semester of deleting a handful of slides each lecture, I have save _three entire lectures_ worth of corner cases!

Some C# niceties:

* Everything is an object, even value types! So our favorite `ToString` and `GetHashCode` methods, etc, are all there. * Generics work as you would expect with very few weird corner cases. No boxed types because... everything is an object! * The last two facts mean that you also get generic arrays, which are fantastic (and, incidentally, are also _implemented_ in C#, which is super cool). * By default, reference types are not nullable. This is a little bit of a pain for an intro data structures course (we turn them off), but it is a great idea for commercial programming. * switch statements work the way you would expect a modern switch to work, and in some cases they even do exhaustiveness checking like a functional language. * Speaking of... LINQ! * In general, the standard library is also better organized. Interfaces start with "I". Collections libraries have been carefully designed and learned many lessons from Java. A good example of an improvement over Java is the IEnumerable/IEnumerator class, which is simpler than Java's Iterator. * Type inference is limited compared to a functional language, but it is dramatically better than Java. Being able to write `var` is wonderful. * Properties are really nice, and the shorthand syntax for property getters/setters saves a lot of time. * C# has a rich set of value types, including structs. Java may have added something like this, since I remember the Scala people hacking away on it, but it is used pervasively in C#, and you can make very fast data structures that take advantage of spatial locality. Rolling one's own hash table implementation in C# is actually kind of fun. * .NET's runtime reflection capabilities are amazing. All of my autograders make extensive use of reflection instead of forcing students to compile with interfaces; this gives them a degree of freedom in implementing things. * NuGet is a million times easier to use than Maven.

The downside is that C# is definitely not as fast as Java, in particular when the runtime is starting up. I remember how painful Java startup used to be, so I am optimistic that this will improve eventually.

Anecdotally, my students this semester are demonstrably more capable programmers after a semester of C# than a semester of Java. It might just be that I got lucky with this group, but I have been teaching this same course (except in Java) for the last 7 years, and this feels like a real effect.

Re: .NET 10

#389
post #319

Earlier quoted context omitted.

> 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…

I had high hopes for Blazor but it didn't really materialize. Instead I'm just sticking with Angular. I don't think Microsoft doesn't know what to do with .NET. I think it continues on a very logical and direct path. But they have no idea what to do with UI on any platform. Luckily they haven't even deprecated any of the existing options and on the web, at least, you have all the same options as every other platform.

I avoided Blazor, despite multiple people on my teams pushing for it. It always felt like it fit in the same space as web forms and silverlight. A product created to fill a gap of developers that wrote desktop apps and don't want to learn how to write front end code for the web. Plus it binds you to the product lifecycle of a .net side project that likely will be abandoned.

While Blazor has some cool stuff built in, the cool stuff never felt worth the risk of building a product around it.

Re: .NET 10

#390

Earlier quoted context omitted.

What libraries are you referring to? I really haven't used any commercial libraries at all since the .Net Core transition (and .Net 5+ as a result). Are you looking at older materials?

Just one example, but when I was running a .Net dev team we licensed the Telerik UI components. We ended up dropping them, but not until we had initiated a migration to Java/PG instead of C#/MSSQL. After we moved to Java everything standardized of a set of FOSS libraries for various things.

We use Telerik components at my current job. They're a solid library, IMO. I'm sure there's better out there, but we've been using them for nearly 15 years at this point and I feel like we get decent value for the money, and their developers get to draw a salary.
Post reply on HN