Live data from Hacker News

The Case for C# and .NET

chrlschn.medium.com

181–190 of 376 posts

Re: The Case for C# and .NET

#181
post #176

Earlier quoted context omitted.

.NET core can run on any platform it wants, but as long as it's from Microsoft, the company as we know it, I won't even write "Hello, World!" with it. A language can't be the fastest at everything in today's mature language ecosystem. OTOH, Debian's "Programming Language Games" benchmarks shows it's on par with Java (which is not slow in any means), and not as fast as you claim [0]. In the page I shared, some C# benc…

Curious, what is it with Microsoft that makes it so poisonous for you that you won't touch anything they make with a ten foot pole? As an example, I'd say Facebook (Meta) is a way more toxic company but I've never heard of a developer have moral arguments against using React

I'm using Linux for 20 years, and witnessing what Microsoft is doing for more than 25. Being openly hostile towards Linux and plotting ways to lock it out of hardware platforms and tech ecosystems is enough of a motivation for me.

It's not only their stance against Linux only, but everything competing with them.

I believe hardware and software should be open and platforms shall compete openly. I don't use any vendor which openly kills this interoperability and try to corner market with underhanded tactics.

It's not limited to Microsoft, though. I use Java because there's OpenJDK, Go because there's gcc-go toolchain, etc. Similarly I don't use Rust because it's LLVM only for now.

However, this doesn't mean that I want these to disappear. I want them to compete fairly, so we can improve. I'm not a web-dev so I have no need for this frameworks, but I'd make similar choices if I enter to that arena, too.

Re: The Case for C# and .NET

#182

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

About the 'dependency problem': It's not as bad as in npm with node_modules, because .NET provides a lot of base functionality in the standard library. But when you start to use multiple nuget packages, sooner or later you will also enter dependency hell, where managing versions and updates of nuget packages gets very painful. All in all we have to reference about 10 external libraries. The visual studio nuget packag…

Did you really mean only 10 external libraries? If you'd said 100 I could understand - I hit a version conflict issue in a recent project on adding what was probably package #60 or so, but solved it easily enough after a bit of googling. And we knew we were using a lot of quite old packages (including .NET 2.1 EF, because of a rare breaking change they introduced with 3.0 that we didn't have a good solution for).

Re: The Case for C# and .NET

#183

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…

Totally opposite experience for me. C# + .NET ASP core Web Api framework + Swashbuckle + FluentValidation does out of the box what I still haven't seen a good solution for in the NodeJs world (which is the one I'm in now).

Re: The Case for C# and .NET

#184

My understanding is that with .NET Core, the experience of developing and running on Linux is on-par with Windows(?). However, my impression is that once it comes to building web services, ASP.NET has more "windows-specific" assumptions/moving parts - can someone knowledgeable on this correct me if I'm wrong?

Any .NET NuGet packages targeting .NET Core/.NET 5+ without the -windows TFM will run on any platform that CoreCLR runs on. ASP.NET 6 is no exception. There is nothing Windows-specific in there any longer, and there hasn't been for quite some time. ASP.NET now runs by default on Kestrel, Microsoft's cross-platform web server.

> Any .NET NuGet packages targeting .NET Core/.NET 5+ without the -windows TFM will run on any platform that CoreCLR runs on.

I got sleepy just reading this. There's just so much fragmentation and frameworks and different versions of frameworks and web-servers... can't Microsoft just let the .NET be and let them do their thing? They have certainly pumped out loads of amazing software that seemed to get a knee on the guts by higher management.

Re: The Case for C# and .NET

#185

Earlier quoted context omitted.

VS Code has a C# debugger on Linux. There are certainly limitations to the open source C# support in VS Code, but for students it should be easily sufficient. If you want a language where not only the core and main libraries are open source, but also all the tools then C# is probably not the right choice. If free (but not open) tools for most use cases and paid tools for larger companies or higher-level demands are o…

OmniSharp (VS Code extension for C#) has been discontinued and there is no replacement yet. Besides, Microsoft purpusefully sabotaged OmniSharp to make it so unusable that it forces people to use Visual Studio, so even if a beginner on Linux would decide to try C# with a discontinued product they would only face difficulties and a basically horrendous mostly broken experience. .NET on Linux is non existent without Ri…

https://github.com/OmniSharp/omnisharp-vscode/commits/master

Re: The Case for C# and .NET

#186

Earlier quoted context omitted.

I think for swagger documentation you install the swashbuckle nuget package and then add these three lines services.AddSwaggerGen(); app.UseSwagger(); app.UseSwaggerUI();

Personally, I'd rather generate documentation at compile time.

Which you can do, by adding a post build step.

Re: The Case for C# and .NET

#187
post #163

Earlier quoted context omitted.

> that the official repo can only "unlist" packages, not delete them or that the publish times sometimes have horrible delays It's to avoid the npm left-pad problem. nuget.org packages are idempotent. For the publish times, I found out you can cut it in more than half if you tell nuget to ignore caches.

I know... but sometimes it is a bad thing for indie hackers testing around :-) Draft releases would be awesome.

You don't have to use Nuget.org, it's just the public community version of a Nuget package repo.

You can use your own private repos like MyGet[1] or Github Packages [2].

1. https://www.myget.org/ 2. https://docs.github.com/en/packages/working-with-a-github-pa...

Re: The Case for C# and .NET

#189

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

I tried writing a simple crud api with asp.net, which should parse and respond json. It was the worst development experience I ever had while writing json apis. Validation? Not existent. OpenAPI/swagger documentation generation? Not existent. Then it also tried to force me into using MVC, while acting that it is express with its middlewares. I switched back to node.js with fastify and wrote my app in an hour. I reall…

What do you actually mean by "non-existent"? The asp.net framework includes more functionality by default with its standard libraries than just about anything else.

Re: The Case for C# and .NET

#190

I also think that C# and .NET are awesome. Especially latest releases dotnet 6 and upcoming 7 have a ton of new things to be even more productive. I like the fact, that you can develop command line apps, Web APIs, Desktop Apps and smartphone apps all with the same toolset, including the fact that deployment is possible on nearly every major platform for every major platform (except iOS and macOS Apps, as always only…

Just developed something using MAUI's predecessor Xamarin.Forms

It was perfect and exactly what I wanted. I had experience with XAML and MVVM thanks to Silverlight and WPF, so that explains at least some of why it was such a breeze. But it is way nicer than coding for the web, and I've done my fair share of that.

I was able to port over most of the code to MAUI easily, except for the missing controls. But MAUI is very exciting overall, and I look forward to using it more. After a map control is released I will fully port my app.

Post reply on HN