The nice thing about the JVM ecosystem (and to a lesser extent .NET) is that it makes new languages a lot easier to spin up and the discussions around them far less contentious because language interop works so much better.
Like, if someone says they prefer Java to Kotlin, that doesn't threaten me at all because I can use their stuff easily. Likewise in reverse, as long as the author of a library actually wants it to be usable from Java it will be. Even stuff like Scala and Clojure where the ecosystem guys really don't care about interop in the reverse direction, it's still possible and can be done when people want it for relatively low cost (just avoiding exotic language features in your API definition, more or less).
It does take a lot of the heat out of those discussions. You don't get the same influx of "I rewrote grep in Rust" type stories.
For a while there I had high hopes that one could pull in Java libraries via their JVM interop on top of the Common Language Runtime, but it doesn't seem to have caught on and I'm not in that ecosystem enough to know why. But yes, for the many excellent reasons you cited it means the library ecosystem is nowhere near that of the JVM, and thus I haven't once considered .net for a new project regardless of how much I love C# the language. Well, that, and my experience with the observability and introspection components of the JVM are second to none
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.
Non-Java JVM languages have been part of the Java ecosystem sincw the beginning, from Pizza and Kawa on forward. Maybe .NET made more developers comfortable with that, but I think it had more to do with that the JVM enjoys HUGE cross-platform library support, solving the bootstrapping problem for getting a new language out there and used.
What I meant was now you have an ecology of languages on the jvm (Clojure, JRuby, JPython, Scala, Groovy...), and on top of this a .NET port is in the works. Sorry if I was a bit unclear.
> 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.
The ecosystem is nowhere near as mature though. I don’t work with either anymore but back in 2017 I made the switch from C# to Java and it felt like a breath of fresh air when it came to the maturity and capability of JVM tooling compared to what’s available for .NET.
As someone who writes a lot of Kotlin for a living, something like 80% of the improvements Kotlin brings that I use on a day to day basis are features to give it the same level of ergonomics as C#... like reified generics...
-
And your comment that .NET is a de-factor one-language platform makes it sound like you've never heard of the DLR (or F# and VB for that matter)
To me the biggest reason DLR languages are not as big as things like JRuby is C# is a pretty damn good language. There's much less value is trying to cobble together existing languages and subpar runtimes when the defacto language is modern, developing at a steady clip, and "delightful" to use.
I wouldn’t really leave behind the JVM ecosystem, which is much bigger and better quality than the .NET one from what I gathered (though it is still good and bigger than most other languages’). And other people’s code is the numero uno productivity boost, so it’s an important area.
It's choosing a different language, versus choosing a different VM, different libraries, a whole different ecosystem, plus it happens to be quite expensive. The JVM is not home only to Java.
One PITA for me is that whenever talks about various technologies happen on HN, I tend to comment on disadvantages, because it's the disadvantages that dictate the best use cases for that particular technology.
But whenever I do that for .NET / C#, there's like a circle of jerks on HN that down-vote everything that sounds bad about .NET.
That's fine, I had some hopes for Microsoft's .NET, now that it is finally being open-sourced and made multi platform, but when choosing a language, you're also choosing the ecosystem around it and this instance, amongst other interactions I've had, confirms that .NET is not for me and probably never will be.
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.
Oh you're not alone. I dislike Java as well, but there's no denying the power of the JVM and the ecosystem around it. If you really dig into it and look at it as a polyglot platform with choices like Groovy, Clojure, JRuby, and Scala, it becomes more palatable.
Regardless this post is not about .NET tooling, more about server efficiency and cost. Two areas where I think the JVM is a little further ahead.
There's a small ammount of trolls that spam "M$" kind of arguments but they are largely ignored from what I've seen.
On the flip side there's a lot of people who over-represent C# especially in comparison with Java. I mean the language is very nice, better than Java no doubt - but the platform and ecosystem is much less mature than JVM. Where is the .NET equivalent of ZooKeeper, Hadoop etc. .NET can use those like any other language but the fact of the matter is that Java was and is still the choice on those kinds of projects and the ecosystem is much bigger. Even when .NET gets something from those like Akka.NET, JGit it's usually a worse copy. And JVM ecosystem is much more distributed, there's plenty of stuff going around all over - Scala feels a lot more popular in the real world than F#, Clojure feels like a similarly niche thing but is entirely community driven, and the early results from Graal/Truffle were quite impressive, much better than Microsoft did with the DLR before they left it off to community.
I really appreciate what I can do with .NET and I don’t do much care for the language that I need to use. Yes C# is nicer compared to Java and C++, but after many years with Haskell they all are nowhere nearly as ergonomic and expressive, which is fine. I’ve tried F# a couple of times but couldn’t get used to the OCaml like syntax.
Anyway, I favor productivity way over ergonomics. And my .NET apps are very robust and very easily deployed. Everything is perfectly well integrated. No surprises. Almost no sharp corners left. The DX is superb. The performance is great. It’s so easy to run. Time to delivery is good. And the most important bit - I don’t need to keep all the hidden Java traps in mind. JVM with its many implementations is an amazing piece of tech, but in my experience it appears as something overengineered and requires too much maintenance and fine tuning. Just like Spring, Hibernate, and many other components of a typical Java app.
Why are there so few new languages built on the .NET platform ? This is a genuine question - is there something about the JVM that gives rise to such vibrant ecosystems.
Clojure, Scala, Kotlin, Groovy, JRuby : Most importantly, every one of them is in production use - not just as toy/experimental languages. And we havent even opened the Pandora's box that is Java 9+Truffle.
There's a lot of broscience that .NET is superior to the JVM - is that on sheer performance only ?
I feel that. It always seems to come down to tooling; the moment you have to fight with tooling for a language, it immediately adds friction. Sure, individual developers can overcome these problems, but it still decreases the adoption rate of said language.
It makes me wonder what differed between the .NET and JVM runtimes, with .NET moving towards fewer languages, whereas the JVM supports more.
Like, if someone says they prefer Java to Kotlin, that doesn't threaten me at all because I can use their stuff easily. Likewise in reverse, as long as the author of a library actually wants it to be usable from Java it will be. Even stuff like Scala and Clojure where the ecosystem guys really don't care about interop in the reverse direction, it's still possible and can be done when people want it for relatively low cost (just avoiding exotic language features in your API definition, more or less).
It does take a lot of the heat out of those discussions. You don't get the same influx of "I rewrote grep in Rust" type stories.
reply