views:

480

answers:

9

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?

+1  A: 

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 =)

Johannes
With Silverlight, Compact Framework, Micro Framework, mono, etc - it is getting there...
Marc Gravell
I would like that Java stop attempting to suit **ALL** platforms. I would like to support just three Windows, OSX, Linux ( and some Unix why not )
OscarRyz
@Oscar, the world is larger than you think :)
Thorbjørn Ravn Andersen
+11  A: 

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.

oxbow_lakes
I think Mono is far enough along now that you don't have to worry about being tied to Microsoft. I don't really understand what you mean by monopoly pricing, as the .NET Framework and C# compiler are free.
Joren
I guess I'm talking about big companies. Really big companies purchase support and want to use a *big* provider like IBM or Oracle or whoever. You may be correct about mono (as I'm from the Java side of things) but I believe that mono doesn't quite fit what they need. Of course for small companies, this is not really an issue.
oxbow_lakes
Mono sounds good, as long you you don't try to use mono on windows or .net in linux :P The former won't run if us use using mono.linux and every one use that and the later won't run if you use any advanced features. While some products that fit in the middle may work, it is not the same to have to look at both sides than just developing int the latest release version ( where you have to look at both sides also, but less frequently )
OscarRyz
As always, use the best tool for the job.
Thorbjørn Ravn Andersen
+2  A: 

I think .NET is great, but don't use it, because it lacks the #1 mandatory feature : portability. Yeah, there is Mono...

peufeu
Actually, I know official games for the Wii and/or PS3 written in C# running on Mono, can't recall a similar thing for Java...
Dykam
Dykam, would those official games for the Wii/PS3 run on any other platform? In other words is this a platform specific game anyway?
Thorbjørn Ravn Andersen
Eh. By and large, portability is overrated. I find most people demand portability for portability's sake.
Erik Forbes
@Erik Forbes - Win16 programs do not run on 64-bit Windows 7. My Java programs does. Portability is crucial to maintainability.
Thorbjørn Ravn Andersen
@Thorbjørn - does your Java program run on Win16?
Erik Forbes
@Erik, not mine but others do. There are JVM's available from Microsoft and IBM (plus the one in Netscape). However, the major difference is whether new programs run on old systems, or old programs run on new systems...
Thorbjørn Ravn Andersen
@Thorbjørn - I know there are situations where that's a concern, but incredibly old software isn't likely to be portable in the first place, and the old systems designed to run such software aren't likely to require new development. This isn't nearly as compelling an argument as *nix / Windows / Mac / Embedded / etc. cross-platform portability.
Erik Forbes
@ERik, portability means having a choice to switch out platforms in case you need it. It is very common these days to host Java application on Google Application Engine. Can't be done with .NET.
Thorbjørn Ravn Andersen
@Thorbjørn - only because Google chooses not to support it. To say it *can't* be done is misleading - it *could* be done, it just *isn't* being done.
Erik Forbes
@Erik, no need for splitting hairs. It is not possible today to deploy .NET-code to the Google Application Engine.
Thorbjørn Ravn Andersen
@Thorbjørn - I'm not splitting hairs; it's an important distinction, especially if Google plans to integrate .NET via Mono at some point.
Erik Forbes
@Erik, it is splitting hairs. Perhaps Google will eventually, perhaps some day, in some future implement .NET in GAE. Point is, they don't do it now, and no plans has been announced to do so. Perhaps they would consider it if Mono was blessed by Microsoft. Perhaps they will make it based on Mono simply to MAKE it blessed by Microsoft. All this is, however, speculation, and if you need to have something in the Google cloud NOW or within the forseeable future, .NET is simply not an option.
Thorbjørn Ravn Andersen
A: 

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. ..

ante.sabo
In here I think you will start to understand why Java is used in enterprise applications.A large enterprise will have a few rock star developers, mostly though they have developers with vary degrees of experience and skill.With Java all of their developers can be productive.Take for example checked exceptions. Java has them, C# doesn't. In an enterprise they make the code safer and hence more productive. Sure the rock star doesn't need them but they force the junior developer to write safer code.
Mr Jacques
It is unbelievable how religion programmers get. I love C# but it is not my deity.
ChaosPandion
@ante sabo, have you tried other programming languages than C# and Java?
Thorbjørn Ravn Andersen
yes, it was C, long time ago... apps were crashing because of mine inexperience, it was an art to get the software working stable..
ante.sabo
+2  A: 

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.

Chuim
The reason I won't really even look into languages without Eclipse support is that Eclipse is also PORTABLE!!! I don't need to install a billion gigabytes worth of software to get my code compiling, I can stick Eclipse to an USB drive and take it with me to any computer I want to.
Esko
@Esko, how do you handle your workspaces? Have them on the stick too? Is the JRE "inside" Eclipse?
Thorbjørn Ravn Andersen
Eclipse is my guiding light. If my program is ever slower or more cluttered than it, then I know I have reached rock bottom in my ability to program.
280Z28
I love using gvim + javac
OscarRyz
@Oscar, how do you do the "look this method up in the superclass"?
Thorbjørn Ravn Andersen
+15  A: 

Make it run on as many platforms as Java?

Otherwise it is completely irrelevant to us.

Thorbjørn Ravn Andersen
Yes, and full stack please, not just the core.
_NT
+1 being tied to Windows is the Achilles heel of .Net. .Net on Linux would be a game-changer.
cletus
It is available on Mac and Linux through Mono: http://en.wikipedia.org/wiki/Mono_(software)
awe
@awe, that's only two...
Thorbjørn Ravn Andersen
+6  A: 

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.

Nikolaos
A: 

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.

OscarRyz
A: 

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.

Cisjokey