4 ms·
The JVM has simply has a lot more resources poured into it. C# and the CLR is a more modern clone of Java and it shines in the great usability of C# and to some
by forgotpassagan 9y ago
The JVM has simply has a lot more resources poured into it. C# and the CLR is a more modern clone of Java and it shines in the great usability of C# and to some extent the more sane op-codes of the CLR. Transforming between the two is actually easy enough that several projects offer 100% interop between C# and pure Java libraries.
I expect performance of the JVM to beat C# for a long time, but since the designs are so similar the difference isn't important in most cases.
Having spent time in both ecosystems, I'll admit that C# is easily a superior language to Java, honestly the best designed language I've ever used. Not surprising since it has the same designer as Delphi and Typescript. It's all syntactic sugar, but so much so that programming C# is significantly faster and easier.
What really hurts the .NET ecosystem right now is an insanely large gap in open source support. Something MS is fostering now but spent more than a decade trying to kill. This will not be easy to fix, as it's more a people problem than technical. MS actively tried to hurt the open source community for over a decade and to get support they will need to change the mind of countless people. It remains to be seen if this is viable.
If I was Microsoft I would remedy this by adding first-class support for Java libraries in C# by throwing their support behind existing projects to do so. This might close a gap that could otherwise take decades to fill
- pjmlp 9y ago> If I was Microsoft I would remedy this by adding first-class support for Java libraries in C# by throwing their support behind existing projects to do so. This might close a gap that could otherwise take decades to fill Apparently you never heard of J#. https://en.wikipedia.org/wiki/J_Sharp https://en.wikipedia.org/wiki/J_Sharp
- forgotpassagan 9y agoI hadn't, but the primary problem is the inverse case. Java programmers have no problem switching to C# and vice versa. The languages are really similar. The problem is that many millions of lines of open source software have already been written in Java and developers are not going to spend thousands of man-years converting them. Especially because they know the languages are so similar. Developers are well aware that it would take minimal effort to make the languages compatible so they make little effort to port from one to the other. And Microsoft's problem is that the vast majority of these projects already target Java. If the languages were vastly different ports would be more interesting and fun to do, but since they're not porting is basically a boring and vastly annoying syntax conversion. Something annoying that nobody wants to do for free. If Microsoft officially supported interop with native Java libraries I believe C# would take off like a rocket. Unfortunately, so far, Microsoft hasn't really sent out an olive branch to the massive open source Java community
- pjmlp 9y agoThere is IKVM for those that care about using Java libraries in .NET. Quantity does not matter, if the relevant libraries are there. I do consulting mostly using JVM and .NET languages, Web and C++. Never was a .NET project where I missed having access to a particular Java library.
- forgotpassagan 9y agoI disagree strongly. I used .NET for years before jumping ship to Java. Guava and Apache commons dwarf anything available for C# at any price. I know because I went looking many times for libraries with similar algorithms and Bloom filters. .NET is pay to play and in most cases something similar in Java was free. I also greatly miss native database libraries when I'm using .NET. a large number, maybe a majority, of open source databases have an outdated buggy port to C# if anything. I will never forget the hell of integrating Lucene with C# because the port is bugged and close to a decade old. This is par the course for .NET MS has a huge problem with lack of open source support unless you're stuck on the (IMO archaic) SQL Server+ Windows server platform. Microsoft has fallen many years behind the times. Having to get a multi thousand dollar license for a server OS and SQL database is a joke. Their VM support outside of Azure is severely lacking and support for containers is junk because they're not based on Linux cgroups like everyone else. Windows as a server OS is as dead as OS/2 was 5 years ago. Linux won, by a landslide, and MS is too proud to just deal with that. Their software is severely crippled in server land as a result.
- pjmlp 9y agoI never bothered to use Guava in production code. The type of customers I work with don't waste any second thinking about Oracle, WebSphere, Enterprise Architect or Visual Studio Ultimate licenses. They are a tiny water drop in the ocean of overall project budgets. Outside the HN bubble, Windows servers are doing pretty well. Containers are the new buzzword. I could also say that Linux containers are junk, because they have quite a bit to learn from proprietary UNIXes experience and what IBM and Unisys mainframes are capable of.
- yazr 9y ago> that several projects offer 100% interop between C# and pure Java libraries. What are the leading/mature libs for this ?
- forgotpassagan 9y agoIKVM is the best I know of, but I heard rumors last year that unfortunately it's main maintainer is moving on to other projects. There's others that cost money but I don't really pay attention to them