Generally speaking, JVM favours more high-level languages, while .NET is the low-level focused counterpart in many of its areas, so if that's what you are looking for, it might pleasantly surprise you :)
It seems like .NET resolves some of the limitations of the JVM (around generics, lowering of float point code, I’m sure there are others). So if you want a managed language VM but some of the magic of C++, .NET might be a nice place to be.
> IMHO though, the JVM has a better alternative language ecosystem than the .NET one. Yeah, .NET has F# builtin to VS these days, but doesn't have things like Scala/Clojure (not first class citizens), Kotlin, Ceylon, etc...
And the irony is: .net was touted initially as a polyglot platform, whereas JVM has been primarily associated with Java only.
.NET has come up on par, or slightly better than, the JVM in recent years in terms of performance. Ecosystem may not be as big but its pretty well fleshed out.
I think that Java ecosystem is more diverse. There are multiple JDK implementations. There are a lot of OpenJDK builds from different vendors, including paid support options. There is an extremely mature library and tooling ecosystem. While I don't think that JVM is superior to .NET VM, it's not inferior either. .NET supports value types while JVM support some very advanced garbage collectors. And, of course, JVM development is not over. Hopefully, in a few years there will be value types in JVM as well. Java is inferior to C# as a language, but there's Scala or Kotlin for those who want better language and they are more on-par with C#. And for many people Java language is enough to write good code and they don't really need any more features. May be simple language is a feature in itself.
I don't see any strong reasons to switch to .NET from Java for those who heavily invested in Java already. But I think that .NET is pretty strong, so the same argument could be made for the other direction, for folks who are fluent in MS infrastructure and want to tackle Linux, .NET probably is good enough to keep using it.
JVM has objects as the basic building block. For WASM it's linear memory(ies), so it's lower level, and was created from the start to support languages like C/C++. .NET indeed looks quite similar, given that it supports C++ compilation, tough I'm not familiar enough with the compilation model to draw comparisons.
Personally I don't like .NET anymore because it's almost exclusively C# only (which seems quite dated compared to eg. Kotlin). JVM env is much more scattered across multiple languages.
Well, that is quite obvious that Java VM is good nowadays - as Clojure creator pointed out - no matter how goofy Java The Language is the JRE and JVM are just awesome. .NET less popular but I am sure it is of comparable quality.
That's quite an exaggeration. The JVM philosophy is different from .NET's, even though there is a large overlap with them being VM based languages. C# has gotten too complex as a language, with so many features. C# also exposes lower level constructs, whereas the JVM tries to do a lot of different optimizations instead. The JVM has the best GCs in the industry, and the best monitoring and observability through JFR.
.NET-the-technology is pretty good, but for many developers, .NET is synonymous with expensive licensing and tooling (and you pretty much have to use Windows, ick).
The JVM and .NET are presently about the same capability-wise, but Java is (or at least, is perceived as) much easier and cheaper to freely experiment with. Unless you need to use C# for some deep Windows integration, this makes Java the obvious choice for anyone without sunk costs in the .NET ecosystem.
Isn't the biggest problem of .NET/C# that Java and the JVM are just too similar? Sure, some things are nicer in .NET-land, but is it worth the switch, which kinda locks you, or at least moves you towards Windows too?
reply