Hacker News new | ask | show | jobs
by random4369 2957 days ago
C# ticks all the same boxes and is much better from a language point of view.

The only reason Java still exists is because it created a generation of professionals who only know Java, only do Java, and won't learn anything else. That group is still large enough to maintain critical mass and create new greenfield Java projects despite the fact that Java is a shit-poor choice of language for those projects today.

4 comments

I code C# for a living and I still prefer Java. A lot of the things added to C# are mis-features IMO. When stuff gets added to Java it's usually been thought out better than the way MS used to cram new features into C#. I quick look at C++ ought to show that every feature under the sun isn't always the best approach. I take issue with your "professionals who only know Java" line. I knew C, C++, Lisp, Pascal and Assembler before coding Java. I've learned C#, Javascript, Python and Rust since. I still consider Java one of my favourite languages. It's a pretty poor ad-hominem argument.
Java was propelled by investment banks that saw Java as a manna from heaven comparing to C++ CORBA and the mess it was. Suddenly you had something simple yet even more powerful than C++ when it came to time to deliver a flawless distributed app. Java's main drawback is the amount of boilerplate code, but frankly that's more of an issue of framework/design patterns than the language itself; similar problems are in Python, Scala or even Haskell, just at a slightly higher conceptual level.

Language-wise C# overtook Java quickly, but SUN was all about openness and about not being big bad Microsoft, and that resonated with the majority of idealistic developers.

C# was too tied to Windows for too long, it lost the mindshare outside of that ecosystem.

Also that whole "Android" thing happened.

> Also that whole "Android" thing happened.

Yeah, and Google made their opinion of Java quite clear by adding first-party support for Kotlin.

As for Java being popular because it has mindshare, you are agreeing with my original point. It doesn't continue to exist because it's a good language. It continues to exist because of inertia.

>Yeah, and Google made their opinion of Java quite clear by adding first-party support for Kotlin.

Which is good for Android developers as they crave that syntactic sugar. Unfortunately, businesses have different priorities.

>As for Java being popular because it has mindshare, you are agreeing with my original point. It doesn't continue to exist because it's a good language. It continues to exist because of inertia.

It may not have all of the syntactic sugar that other languages have at the moment, but given its new release cadence its only a matter of time before it reaches feature parity.

Agreed. Java was first, so that's primarily why it is where it is today in terms of market share. But C#, and its functional cousin F#, are now leading the way in the evolution of modern programming languages. With .Net Core now being open source and all-platform, we should all look forward to it supplanting Java and JVM as the ubiquitous language and runtime.
We used to be a Microsoft/.NET shop, and switched to Java for the ecosystem, as well as the fact that all the interesting things in cloud happen outside of Redmond.

Somewhat nicer syntax and some functional features isn’t going to fix the wider problem Microsoft has, which is the reason for .NET core existing, I suppose.

>which is the reason for .NET core existing, I suppose.

True, .Net Core exists because Microsoft eventually realized its mistake of tieing its programming framework too closely to its operating system. But... that mistake is now in the past, for some years now.

>all the interesting things in cloud happen outside of Redmond.

We're getting a bit off-topic from OP with this, but can you please give an example of some other cloud provider's service for which there is no Azure equivalent?

> We're getting a bit off-topic from OP with this, but can you please give an example of some other cloud provider's service for which there is no Azure equivalent?

I'm not referring to Azure feature line items, but rather that in the industry, Microsoft is usually an afterthought.

The innovation happens elsewhere, and then Microsoft has to themselves try and port it to Windows. If you're running on Azure, eventually you're running on Windows (yes yes, it can do Linux VMs).

We did .NET forever, and always had to try and make do with half baked adapters and integrations when wanting to use things like Hadoop or Spark back in the day, not to mention containers took forever to come to Windows.

Got tired of waiting for Microsoft or the community to port things over, just switched to the platforms and languages where this was all native. I'm sure you'll say it's better now, I've been hearing that for quite some time now, but every time I look, it's still confusing, muddled and in beta.

Kubernetes, JVM & Node.js works great for us now, and GCP is absolutely rock solid and performant.

And we don't have to wait for Microsoft to bless us with the only implementation we're ever going to get, the OSS community is much, much, more active outside of the Microsoft bubble.

.NET Core still fails short of many features available on .NET Framework.