by lmm · 2y ago · 0 comments
It's kind of a shame, because in isolation C# is a pretty well-designed language. But people don't switch to better-designed languages, they switch to languages that have a killer feature that their previous language was missing. C# never managed that.
While I do have major criticisms of C#, this is an often repeated criticism that doesn't hold much water. C# is Open Source (with capitals) regardless of how or when it happened, Oracle is notoriously litigious.
But then again, Java can’t even do that. Its build and packaging systems are a tedious joke. If you want to package a C# binary, you simply invoke either of the two (one is JIT, one is AOT):
dotnet publish -o {dest} -p:PublishSingleFile=true -p:PublishTrimmed=true
dotnet publish -o {dest} -p:PublishAot=true
Done. No runtime required.Also, most applications use ASP.NET Core and EF Core in back-end (which are platform-agnostic) and a selection of libraries for desktop and user facing applications on front-end: Avalonia, Uno, now MAUI, Xamarin (all of these are cross-platform) and historically WPF, Windows Forms, UWP and WinUI as their successor.
But the part that matters is that you can ship a single file to people who are on any platform and be confident it will work. Yes the file is .jar and using a runtime, but those details are mostly irrelevant - everyone has Java installed somewhere.
Whereas with C#, sure you've got your nice binary, but if I try to run it on FreeBSD or Sparc is it going to work? From bitter experience, probably not - as GP said, probably for reasons that are more bad code and culture than a bad language, but the fact that several of those major (even if they're now considered "historic") GUI libraries are Windows-only and almost-but-not-quite work outside Windows sets the tone for the whole community culture.
There are more languages without async await that ones that have. The language that’s known most for massive concurrency, go, does not have it. None of the functional programming languages needs it either.
Seriously. Any of the GC languages would be several orders of magnitude better simply by doing nothing but copying "java.util.concurrent" into their language.