What features should C# 4.0 onwards have to encourage switching from Java?

Make it run on as many platforms as Java?

Otherwise it is completely irrelevant to us.

.

.

.


Edit: For a discussion about Mono making .NET "cross platform", see https://softwareengineering.stackexchange.com/questions/20275/mono-is-frequently-used-to-say-yes-net-is-cross-platform-how-valid-is-that


Edit 2015: Microsoft has decided to open source the backend part of .NET, which will enable community to port this to even more platforms than Java runs on. I consider this the ultimate move against the oracle approach to Java evolution.


Edit 2019: .NET Core is now available for Linux, and therefore as Docker images. Our experiences so far has been very nice. We have a mission critical application which runs nicely in Kubernetes, and we have no particular preference for writing microservices in either .NET or Java.


The general uptake of C# in the marketplace has nothing really to do with language features, which I understand are now superior to Java. Adopting C# requires a complete organizational strategic shift in the main:

  • You already have a gazillion Java applications and a host of Java developers. Why switch C#? You'll need new staff and suddenly all of your applications are legacy by definition. This is a huge deal! Undergoing this change puts a huge risk on your company for what may be only slight benefit: why bother?

  • You are used to at least the option of many large providers of operating system and middleware which support your Java ecosystem. This disappears overnight and you expose yourself to a monopoly pricing model (i.e. you are pretty much tied in to Microsoft, to all intents and purposes). Being subject to monopoly pricing is bad! Most organizations would rather have a slight technological disadvantage to avoid monopoly pricing because the pricing will almost certainly take away any extra revenues anyway.


I don't actually think that C# has anything less going on for itself than Java, except for the ecosystem like IDEs, frameworks, etc. In terms of features, it is well ahead at the moment at least.