38 comments

[ 4.5 ms ] story [ 139 ms ] thread
I think the key thing for me is - Java has been an open platform for decades and has huge amounts of library support. I don't think even python can actually match Java for just the sheer pervasiveness of libraries, and many of them are pure java too, whereas many python libraries are C modules.

C# still lives under the specter of Microsoft. EEE is recent in many of our memories. And the last time I looked at C# (considered using it with Godot), compiling still required some silly setup stuff and the tooling was also subpar compared to Java (though all languages are subpar at tooling vs java. IntelliJ alone is a reason to use Java imo.)

As someone who uses both very frequently, tooling on dotnet is better. Jetbrains has Rider.

Library support is pretty great too. Honestly they are pretty much interchangable and I'd choose based on my team's proficiency.

(comment deleted)
> As someone who uses both very frequently, tooling on dotnet is better. Jetbrains has Rider.

OmniSharp barely works at all outside of VSCode.

When I considered C# via Mono in 2016, it was definitely not ready for production. ASP.NET MVC, for example, would not run on it.

The state of things have probably improved with Microsoft’s investment in Linux. But I’d assume that the primary ecosystem users will make implicit assumptions about the operating system.

C# is only “kind of nice” (a better Java, before Java also became a better Java), but with JVM I can use both Clojure and/or Scala.

Mono is a completely different implementation though. .NET Core is a rewrite with first-class support for Linux. I have been using it on Linux for as long as it has existed and it has always felt really natural. It even warns you when you do platform-specific stuff.
.NET has been open source for over half a decade now and building a program is as easy as running `dotnet build` and has been since .NET Core was first launched
What did you have to do to compile your code. I've been writing c# for 6 years and never had to do anything special. Not sure what you're talking about ..
If I had to start up a new web-service right now I would reach for Java + Spring Boot. Boot gets you running fast, and since I use Java for my day job I’m very familiar with the ecosystem.

I’ve been out of the loop for C# for a while (only using it when I play with Godot). What’s the C# equivalent to Boot these days? (Doesn’t have to be a Boot clone. More like the fast off the ground, but powerful enough to last framework)

ASPNET core razor pages or MVC for web pages, web API or minimal API for http apis (depending on needs)
This is my problem with C#. Too many ways to do one thing.
In Java land there’s many more.
I just read the whole thread, and nobody has mentioned the culture of .NET.

In .NET culture, few developers share, fork, or communally develop code, and you sit around waiting for great Microsoft mother to deliver features. There is no ecosystem; there is one provider, and provider is beholden to a couple of guys and, beyond them, investment fund shareholders.

How many regular developer fork Java to work on the JRE?
Libraries, not the core runtime.
A quick glance at the .net core repos shows your information is incorrect/out of date, which I think is one of the points op makes. .net features are also being developed by regular community members.
There are 350K unique packages on Nuget about the same as PyPi…
I’ve been working on c# quite a bit lately, and I don’t think that’s true as much these days. The biggest things remain Microsoft-granted — asp.net, efcore, etc — but I’ve had little issues finding Nugent libraries for random issues like progress bars, weird formats, various excel libraries, etc all community-maintained & provided; my expectations on finding libraries is similar to python.

The biggest issue I’ve had is that some of these less popular libraries (both by Microsoft and not) have some truly tasteless APIs, I think mostly stemming from older versions of C#, and for some reason the lowest quality stack overflow answers are much lower for C# than in python — there appears to be much more cruft and outdated information in blogs, stack overflow in C#-land than python. Really in general I feel like python/rust has a higher floor for taste than C#, but at ceiling it’s competitive.

I’m pretty sure though that startup language choice has nothing to do with practical considerations — it’s largely a popularity contest based on hype cycles, and C# is well past its hype-prime.

As you mention yourself, how many use .NET for web stuff without ASP.NET, or for databases without EFCore? Sure there are plenty of third-party "single-task libraries", but all the big architecture-impacting decisions tend to come from the ivory tower.

This kind of reply reeks of when Phil Haack tried to convince people that (the old) .NET Framework was "open-source friendly" because NuGet existed.

The reason is pretty simple. It's because those 1st party frameworks are awesome. There is very little reason to build something else when you can contribute to them instead. ASP.NET is crushing other web frameworks in performance on techempower benchmarks, it's up there with Rust frameworks. And EF is probably the best full fledged ORM in existence (when compared to something like Java Hibernate).
NHibernate is quite popular alternative to EF and I've seen it used on many projects, especially big apps. Some smaller apps also choose Dapper (by StackExchange) and avoid EF.

Regarding ASP.NET, you're right. There are some alternatives, but not used very often from my experience.

I think it certainly used to be the case, but I don't see this any more. Having said that dotnet is pretty "batteries included" so you can go a long way without too much third party stuff
This is (no longer?) true, as others have mentioned. Just a few examples of great third-party packages that I use for many projects:

* MoreLinq

* Newtonsoft.JSON

* CommandLineParser

* log4net

* UnitsNet

* OsmSharp

* NodaTime

* GMap.Net

* ImageSharp

I'd add:

* Hangfire

* Quartz.NET

* NHibernate

* AutoMapper

* StackExchange.Redis

* the Castle project

* xUnit

* NUnit

* Serilog

* SimpleInjector

These are all very popular long maintained open source libraries I've seen used in many projects.

Another to add

* MassTransit

* AutoFac

* MediatR

* Elsa

* BenchmarkDotNet

Anecdotal, but I have only seen dotnet in job ads at Microsoft and the absolute bottom tier of enterprise environments. Banks, retail, crappy government projects, etc. I used to be in a government job and we considered dotnet beneath us, slow and crappy as we were. It only came up when shitty consulting firms were bidding on business.

So I cannot imagine the average dotnet programmer is very good.

I am sure there are startups out there using it and reasonably sized real tech companies, but I do a C# search on LinkedIn and I just see a bunch of crappy non tech firms.

I've been at tech startups and high tech jobs that both heavily use dotnet so these seem anecdotal at best. If you're in the ecosystem there are huge numbers of jobs out there
I think it's weirdly regional. Around here it'd be mostly large enterprise stuff (generally of pretty low quality), plus Microsoft. Move one country over and it's commonly used...
My anecdotal experience is that anyone who thinks something is beneath them is usually not very good either…
> Microsoft and the absolute bottom tier of enterprise ... we considered dotnet beneath us ... shitty consulting firms ... I cannot imagine the average dotnet programmer is very good

Thank you. I very much appreciate you self-selecting yourself out of the pool of people I'm ever likely to have to work with.

Modern dotnet core really is great and people should give it more consideration. It is not 2016 anymore.

C# is beautiful and there are others (F#) if you prefer on the same platform. There are some great modern and well supported libraries to use for almost every use case. You can get into the nitty gritty if you want with easy interop and control over memory layout.

If you need your product to scale eventually there are good bindings/integrations for all cloud platforms with good support. The core is incredibly fast and getting better every release. The tooling is great too. (rider et al, and dotnet cli is good too)

I've worked with python, go, java and c# and nowadays I much prefer the dotnet ecosystem.

We're a startup that uses dotnet. Develop on Windows and WSL, deploy to Linux containers in K8s. Works fantastically well for us.

I think one thing that's very underrated in dotnet is the new analyser functionality. It basically allows to to upgrade an migrate your whole codebase to new versions/preferred idioms in a zero cost way. Of course you can stick with the existing code as generally compatibility is good, but the analysers are fantastic things I haven't seen too much in other languages.

Slightly off-topic:

The top Reddit response cites some good reasons why this may be so. The writer mentions they needed to move from Node to improve "throughput" (and .NET was suggested). In what way would .NET improve performance that Node can't satisfy. (Isn't Node's worker thread sufficiently close to ASP.NET, ISAPI multi-threaded scenarios?)

In my opinion, you can go a bit more low level in C# and have control over allocations, data copying, threads, etc. Also, .NET is a bit more general purpose than Node. If the workload is more about computation (CPU/GPU intensive stuff) or has some unusual technical requirements (uncommon protocols, interop, etc.), you can really benefit from being lower level and more generic.

But all this is very project specific... it's hard to make these sort of claims about performance.

A good share of the comments both here and in the Reddit thread reveal the biggest reason. C# is an absolutely fantastic language but there is so much FUD, misinformation, and general baggage around it that picking a “safer” language like Java (HA!) is a better bet. C#’s prevalence in enterprise environments also creates a bit of a feedback loop where it’s seen as only appropriate for engineering teams in that context which means it’s mostly used only in enterprise environments.
Didn't read through the entire thread but anyone that has experienced startups will have seen that the stack is decided by the tech co-founder/ first engineer. This is because they are often still the only engineer. And they will decide on a language they already know - a language that is not popular among startups is a language not popular among engineers that join early stage startups. I could imagine that many enterprise developers using Java or dotnet have relatively comfortable jobs and tend to not relocate.

There is then the point where a startup may need to "step up" to a more large-scale language, for example when Twitter started incorporating Scala. But succeeding enough to reach this point is a small subset of startups, many probably not even called startup anymore, so any language at this stage may not "feel popular" when limiting to startups.

I said it before and I'll keep repeating it, the reason why .NET lacks adoption in startups is because .NET is as much Enterprise as anything can be.

.NET has a talent pool which has somewhat peaked. Most of the .NET folks are settled in very cushy Enterprise jobs, building that Enterprise product that nobody has ever heard of but just delivers value to those businesses. These developers have gone through many years of Enterprise brainwashing and even though they wouldn't want to admit it they just think like an Enterprise developer at every stage of the development lifecycle and that doesn't attract startups.

.NET developers would make catastrophic or dumb tech choices for startups, they'd be pushing for using fringe Microsoft products such as Blazor, MAUI or ServiceBus for their projects and they rely on Microsoft for everything to be provided which the rest of the world already has adopted a long time ago. Like 9/10 .NET developers don't containerise their apps until Microsoft built in container building into their MSBuild toolchain. 9/10 .NET developers wouldn't use Docker compose to instrument a local dev environment but when Microsoft advertises them a shitty copycat project (which is dead now btw) called Tye then they will use this shit. 9/10 .NET developers will not use a NoSQL database until Microsoft came out with CosmosDb. 9/10 .NET developers will not use pub/sub or a queue until Microsoft advertised them ServiceBus. 9/10 .NET developers will not use OpenTelemetry with a Jaeger dashboard, until Microsoft provides them their own copycat clone again. It's extremely depressing to work for most .NET companies if you are a technologist because you will constantly fight against people who only do "the Microsoft way". It's awful and I totally understand why no intelligent founder would let this virus infect their business. As a startup staying away from .NET as far as possible is probably one of the smartest decisions one can do.

Having said that, if you work at Xerox, Fujitsu or IBM then .NET is brilliant. It will give you everything that will make you an outstanding developer in your manager's eyes and surely secure you many promotions.

With this stereotypical view you are dismissing the legitimate technological advantages of the modern .NET platform, which, in my opinion, is now better than Node, Java or Go.

Also, .NET ecosystem is way richer and more open than you perceive it to be. There are 350K packages on Nuget, and probably 0.01% of them are shipped by Microsoft.