tags:

views:

700

answers:

2

Is there a chance that Java will catch up with C# considering the fact that Sun is now headed by a Software guy(Jonathan Schwartz) and James Gosling is back in the mainstream of Sun's development operations against Microsoft's continuous release of new and quite useful features in .NET 3.5 and the coming .NET 4.0? Or maybe developers should expect to stick by Microsoft for some time before the next new blitz comes along.

+18  A: 

Who said it was behind?

duffymo
Oh come on, where have you been hiding?
cletus
good answer duffymo
toolkit
Depends on how we'll define ahead or behind. There's a case to be made that the two are largely equivalent and have traded features back and forth since the beginning. Personally, I don't consider closures to be a deal-breaker.
duffymo
@duffymo: Can I ask how much experience you've had with C# 3? Lambda expressions (and LINQ in general) allows *so* much clearer code in my view. It really is very significant. Add to that the using statement, events, properties, lack of checked exceptions, execution time generics, etc...
Jon Skeet
C# played catchup on Java until about .Net 3.0. Its not just closures. Its delegates (anonymous classes are way more verbose than delegate or closures), run-time binding ("dynamic" from C# 4.0), the "var" type, better generics, operator overloading, etc. The enums are worse though.
cletus
@Jon: ah yes, LINQ is huge. So is no checked exceptions (god i hate those), as/using blocks. BTW duffymo's questions relate to "How do I learn C#/.Net?"
cletus
"its" is the possessive. "it's" means "it is". Operator overloading was deliberately left out of Java at the beginning; I don't see that the argument against it has changed. I'm not convinced that the marginal utility of those differences will make an average programmer great, but I'm listening.
duffymo
@Jon: Zero experience with C#, so I have a weak argument. But events? Properties? Unchecked exceptions? Generics (even if poorly done and confusing)? I can map those ideas to things in Java. What am I missing? I'm honestly not trying to be argumentative. I'd like to learn.
duffymo
@doffymo: you can map them into 80x86 assembler too if you really want. That doesn't make it a good idea. Or, more importantly, a productive use of your time.
cletus
Even though java is lower standard, i find this answer amusing :)
Filip Ekberg
When I say map, I think I can identify language features that do the same thing. For example, I can make all the exceptions that I write unchecked. And if I do have to deal with legacy unchecked exceptions, I can wrap and rethrow. That's far different from mapping to assembler.
duffymo
@cletus: Your productivity or that of Jon Skeets has little to do with any language syntactic sugar or the number of keystrokes that it takes for you to implement some behavior. If that were the case, everybody who uses C# would be at your level. There's something else. JMO, of course.
duffymo
Closures really are a big deal, as is LINQ - all these upvotes smacks of java otakus a little
annakata
For me, C# generics on value types are the dealbreaker. The second is probably the events model over the listener model in Java. And LINQ is amazing. The language is closer to the way I think, I guess that's how I'd put it.
Ray Hidayat
At the same time though, you can do everything C# can do in Java, even if it does take longer. Because of that, I don't think Java's outdated. Yet.
Ray Hidayat
Wow, this answer gets 14 upvotes? I guess this is the last refuge of the naively eternally optimistic and the plain ignorant (sorry but its true).
cletus
@cletus - perhaps you're right. Time will tell. I'll have to try and climb to your level with C# to make my own informed decision. I will point out that it's still good enough for Jon Skeets to swing both ways.
duffymo
@Ray - thanks for the detailed response, more incentive to learn.
duffymo
@doffymo: actually I'm way more proficient in Java than C# but I'm not blind to Java's limitations and, more importantly, Sun's inability to lead the platform (since Java 5 anyway).
cletus
@cletus - Thank you. Your points are well-taken. Is the misspelling of my nic deliberate?
duffymo
deliberate mispelling? no.
cletus
I was really excited about the possibility of lambda expressions in Java 7, because I tend to use a lot of AICs w/ functional idioms in my code and that syntax is UGLY; I was disappointed when I heard they wouldn't be included. LINQ also looks pretty nifty.
Adam Jaskiewicz
Oh and http://stackoverflow.com/questions/295224/list-major-differences-between-c-and-java/295248#295248
cletus
It is FAR behind. LINQ, WPF, etc... in Java you get NOTHING.
Turing Complete
+7  A: 

What a lot of people said was C#'s weakness was that it had a single controlling body (Microsoft) and most people assume this was a bad thing.

As it turns out, the past few years have shown having a single driving force behind it has been an advantage for C# and a weakness for Java. Java is becoming way too fragmented, too many directions at once. I've been saying for a while now that SUN should really take the reins of Java and start driving it again.

Neil N
I work with a lot of Java devs, and have done plenty of Java myself. This is exactly the argument I have made to them. The JCP is _killing_ Java. Behemoths like IBM don't want Java to be better; they want it to be frozen in time forever.
Michael Meadows
+1 Amen to that. Sun has shown they can't drive technology anymore. Their acquisition of MySQL has stalled its development (look at the debacle that is the 5.1 release). And they waste time on pointless "me too" wannabe technologies like JavaFX.
cletus
Agreed. Though, what is keeping me from C#/.NET is the expense of getting into it. I'd need a copy of Windows, Visual Studio, etc, and then I'd be limited to one platform (yeah yeah, Mono etc.; it still isn't as cross-platform as Java.)
Adam Jaskiewicz
Windows yes, Visual Studio No, theres a lot(ok maybe a couple) good free IDE's for .Net dev.
Neil N
visual studio express is free isn't it?
cletus
At this point, my home machine is rather outdated, so I would probably want a new machine so I could run Windows in a VM with reasonable performance. From what I've seen, it shouldn't be hard for me to pick up C# (I write Java at work), so I'm focusing on more *different* languages like Erlang.
Adam Jaskiewicz