views:

494

answers:

5

C# 3/3.5 includes a set of new features which Java does not support (linq, wwf, lambda expressions, etc). C# 1.0,1.1 and 2.0 was comparable to Java in many ways. What do you think of this? do you agree? Is this a good thing? What is the future for both these languages compared to each other?

A: 

I think Java will continue to be the leading language for cross-platform development, whereas C# will be the primary language for Windows applications (ignoring C++). Yes, Mono project is coming along way, but it will always lag behind MS developmental efforts.

Adding functionality in a language is almost always a good thing. Remember, you dont always have to use it.

JTA
I disagree with the last part. If you keep adding functionality to a language with no regard to the added complexity, you end up with a kitchen sink which no-one can really get their head around.Just because *you* may not use a feature when writing code doesn't mean you won't have to read it.
Jon Skeet
"Mono will not always lag behind MS developmental efforts" - this is blatantly false. While they have been/is lacking behind in some areas they are in front in many others. Just look at the way you can do iPhone development with Mono in C#. Try doing that with .NET.
Anders Rune Jensen
A: 

I would really like for Java to adopt some of the features in C# such as closures. It's been a bit of controversy in Java land whether to adopt closures, and if so, in what form. Right now I don't think closures will make it into Java 7.

From what I've seen about the proposals for Java 7, it looks like there will be no new major features added to the language, but newer APIs will be rolled. While it is possible that the Java language will make a major change such as adding closures, I expect Java's evolutionary steps to be along the lines of small refinements.

Alan
+2  A: 

Like most serious languages under active development, C# and the Fx is getting closer to Lisp all the time (this is a good thing). Consider the introduction of lambdas, anonymous delegates (which are functionally closures), the dynamic runtime, linq and expression trees (data as code / code as data).

Java seems happy where it is. It will be interesting to see where things go with Clojure.

fatcat1111
+1  A: 

We don't need another Java. We already have Java. The more divergent the languages become, the more useful they become.

Jeffrey L Whitledge
+4  A: 

Many of the proposed Java 7 features look like they're reacting to C#, which is no bad thing if they're done well. Unfortunately, with checked exceptions and the historical lack of delegate types, it's hard to create a simple closure syntax.

Scala appears to be somewhere between C# and F#, but running on a JVM. (Apparently it used to run on the CLR, but the current version doesn't.)

Personally I'd like to see a bigger revamp of Java which threw away backward compatibility for the sake of getting things right for the next 15 years - particularly if "good" programs in existing Java still worked in NewJava. I know it would be a massive upheaval, but sometimes it's worth doing. Now whether NewJava would actually be significantly different from C# is a different matter...

Jon Skeet
The beauty of a shared infrastructure like the jvm or .net is that anyone can come up with NewJava. In my view NewJava is Clojure, it even plays well with Java, but this is getting a bit off-topic :)
Anders Rune Jensen