Hacker News new | ask | show | jobs
by mhh__ 45 days ago
Yes I think it's a bit underrated. The problem I find is that no one writes C# libraries that actually do anything (e.g. even basic linear algebra is pretty crap compared to python) and that the JIT is a pointless hindrance but the experience of using the stack is pretty good.
6 comments

I agree completely regarding libraries, C# has never had the "libraries for everything", especially open source ones. The better libraries have moved to ( or always have been ) licensed too which doesn't help that impression.

I'd like to hear more about your issue with the JIT and where do you find it a hindrance?

I've had a few benchmarks lately that performed better under JIT than AOT compilation, and while that isn't always the case, the JIT, especially on dotnet 10, performs very well.

No, but when used in application areas where languages like C++ are the obvious alternatives, it has always had very good integration with native code and platform technologies, and in recent history both C# and the .NET ecosystem have been very focused on performance and platform support.

Put another way, "100% pure .NET" was never a goal in the same way it was in the Java world, but I never saw this as holding it back any more than the reliance on native code holds back languages like Python, because both have very good integration stories.

My only complaint is the lack of cross-platform support for C++/CLI, as it was a very useful tool for integrating with libraries that lack a non-C++ API.

The JIT adds basically nothing to the language other than complexity and also forces a boundary between dotnet and it's peers that I think hobbles it via harder interop.

The performance in theory can be slightly better in some niches but my point is simply that it's a huge chunk of complexity for not much gain.

> The problem I find is that no one writes C# libraries that actually do anything

Yes, because when you think about it, why should they?

MS has showed many times how unreliable and even user-hostile they can be, so the community at large is very wary of their ecosystem in spite of real advancements.

at least supply chain issues are less problematic if everyone depends on MS :)
C# indeed does not have a catch-all ecosystem. But for some domains (servers, UI are a mess but also pretty good, CLI is plausible), it has a very good support. Like Java but nicer (this is subjective) and faster (this is not).
> even basic linear algebra is pretty crap compared to python

I wouldn't qualify that with "even". Numerical stuff like that is one of Python's most well-developed niches, and Python's numerical ecosystem is the benchmark everything else needs to be compared against.

Why I qualified it "for backends".

C# sweet spot is really web APIs (and all variants thereof), IMO.

numerics is I think OK but very expensive
Crap is probably unfair, but they are incredibly limited for numerical work compared to python or c++
Define numerical work, every user is its own snowflake.
I mean, just look at the docs for https://numerics.mathdotnet.com/ and compare them to those of https://numpy.org/doc/stable/reference/index.html#reference never mind https://docs.scipy.org/doc/scipy/tutorial/index.html#user-gu... . The amount of stuff cover by mathdotnet is tiny in comparison.
Are we comparing bullet point lists, or what actually someone needs to get their job done?
I mean, I lead an initiative to move numerically heavy microservices from c# to numerical python in my previous job (that was initially a windows shop but absorbed a linux based r&d company) because c# was so limiting. But details on that don't really fit into a HN comment.