Live data from Hacker News

The Case for C# and .NET

chrlschn.medium.com

211–220 of 376 posts

Re: The Case for C# and .NET

#211

Earlier quoted context omitted.

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…

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

ASP.NET configuration is one of the most arcane parts of .NET that I don't like. You have to perform the incantation thrice: add package reference, add service reference, invoke the builder extension. And there's the right order and the wrong order of invocations, and if you pick the wrong one, your app silently won't work correctly.

Re: The Case for C# and .NET

#212
post #204
post #158

Earlier quoted context omitted.

> I don't like Visual Studio as IDE, but VS Code is an acceptable alternative tool, although I personally prefer the non-free JetBrains Rider. I've used Visual Studio for 20 years now, and while the tooling has come a long way, I'm starting to feel like MS and the community are abandoning it for VS Code. I don't mind VS code, but unfortunately the stack I'm working in (Dynamics 365) requires plugins for Visual Studio…

Hey fellow Dynamics 365 (CRM?) developer. I see they move in VSCode direction with tools like Power Platform CLI [1], power platform tools extension [2]. PCF (PowerAps Component framework) enabling to develop UI components in frontend framework-of-choice... however none of that is available (yet?) for On-Premise deployment so we're 2nd class citizens. Because of that, haven't been able to play with this and try out s…

F&O, sadly...

Re: The Case for C# and .NET

#213

This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.

Whats wrong with comparisons to Java, and why the need for you and the article author to throw shade at Java while singing the praises of C#?

Java and C# are very similar languages.

Re: The Case for C# and .NET

#215
post #140

This seems more like Yet Another Medium Article shooting fish in a barrel by describing problems with the JS ecosystem rather than an actual case for C# and .NET.

... with large gifs in the middle.

He already said “medium article”

Re: The Case for C# and .NET

#216

This thread shows there is still a large amount of FUD around .NET and it’s community. Folks here still think it’s Windows-only and comparable to Java. Yet latest TechEmpower benchmarks shows .net running on Linux and being faster than Go, Python, Node, and Rust.

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

The difference between the shootout microbenchmarks and the TechEmpower benchmarks is that the former test computation-intensive tasks and the latter test an end-to-end web backend example. It tests how good the compiler is, how good the DB drivers are, how good the HTTP stack is.

What's so good about MS ranking in the TechEmpower benchmarks is that it's the fastest full-featured "enterprise" framework. Frameworks like drogon or just-js are impressive feats of engineering, but the only reason they exist is so that their authors can mention that on their resume. If you run them in production, you are on your own.

There's equally fast Vert.x, which you can buy support from Red Hat for, but most Java shops use Spring Boot (vmware or Red Hat support available), which is easier, but hopelessly slow in comparison.

Re: The Case for C# and .NET

#217

Earlier quoted context omitted.

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

Yeah I know all this, you can even use BaGet[1] symbol server to cache or manage private dependencies in an enterprise network. That is not the point... I think that the most used tool / platform should provide more flexibility for non-enterprise or less expierienced developers.

No offense, I like nuget, but I recently made a typo and checked in 0.0.23 instead of 0.0.2. Now, everytime I add a dependency that is I also burned a 1.0.0 because of a failing script like that... not really bad, but annoying...

https://github.com/loic-sharma/BaGet

Re: The Case for C# and .NET

#218

C# and TypeScript seem to be far and away the most popular programming languages today. At least from the perspective of recruiting in Australia. Python is on the way up and third most popular but well behind C# and TypeScript. Golang is on the way up but very small in terms of number of developers. Java is on the way down but will never vanish, it's just not super popular any more. Ruby is small enough to just be a…

Perhaps in Australia, but certainly not worldwide. C# is way smaller than even Go in total, and Java is a lumbering giant. Slow perhaps, but there's no David around at the moment.

Source for "C# is way smaller than even Go"? It's possible that there are more shops that use some Go (esp. for DevOps) than there are ones that use some C#, but that's not quite the same as C# being "way smaller".

Re: The Case for C# and .NET

#220

Earlier quoted context omitted.

How are collections in C# worse than in Go? In C# you have LINQ, in Go you're writing for loops around array slices.

Maybe I was using it wrong? As I recall, "the usual" APIs present in most other OO languages were not available when I tried to help a friend with a project 3 montjs ago.

Which collection APIs were you missing? Between the standard interfaces and their default implementations[1] and the extension methods to IEnumerable[2] you can do quite a lot in my experience.

[1]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...

[2]: https://docs.microsoft.com/en-us/dotnet/api/system.collectio...

Post reply on HN