What features should C# 4.0 onwards have to encourage switching from Java? [closed]
Java is a popular language & platform, having a huge ecosystem. Are there any features that C# 4.0 onwards and its platforms should have, to make you completely switch to C# programming?
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.
I think .NET is great, but don't use it, because it lacks the #1 mandatory feature : portability. Yeah, there is Mono...
Another thing that really pushes Java is Eclipse (*): it is the most successful and complete free development environment to date. And, together with a huge amount of (mostly free) plugins available, the cost/benefit is unbeatable.
The pair VisualStudio C# + Reshaper can get close but it's not quite there yet...
(*): Some even say Eclipse is the main reason why Java found so widespread use.
My answer is a litle about why I think so many use Java, but want to use c# in schools:
At my university, Java is the first language we learn, and is the language that we learn most about later also. I guess this is common.. But even tho we learn some python, c, c++ and already know a lot java, most students use C#. This is because everyone is told that C# will give them a job :) The school knows this, and I know one feature that would make C# the new primary choice for the school: make it run on all platforms =)
We were taught on college that there is nothing engineerical in MS Windows. How many people can (dis)agree with that?
How can we as developers answer to questions of stability, robustness, scalability, availability, transactional isolation, concurency when building some serious software system by working on an OS which is pale of 'something' and just anywhere you can expect some nonstandard behaviour surprise and potential source of problems which you can solve only by calling MS and pray God they will find a fix for you not in a long period.
Open Source is our only salvation.. Java respects standards, invests much energy in security model, keeps WORA, and it is rather simple language.
I can think of C# having unsafe pointer, thats just enough for me to give up on doing serious business with it if there are many people working on it. ..
Come on guys, if you do real serious software and would like to have kind of multiplatform support, NET will never be the thing you need or you would want to.
It wasnt even designed to support that.
I would definitely consider using C# when Microsoft buys Novell and gives official support to Mono.
Then, the next .net
release will have to run on Windows and Linux ( OSX wil still left behind - like today with Java but with Java is because they wanted that way- )
Until then, Mono is behind the latest .NET version, and is still adding to it's core some Linux specific features ( like the Mono.Linux "module" ) that obviously doesn't run on Windows.
Language features are great, but if I want something more "dynamic" to work with, I would rather use Ruby or Python
But, that's just me.
精彩评论