Please note that this isn\'t meant to be a Java vs. C# argument. I\'m a Java pro
ID: 644477 • Letter: P
Question
Please note that this isn't meant to be a Java vs. C# argument. I'm a Java programmer with no C# experience, asking just out of curiosity.
I did some reading on C#, and it seems it has much more features than Java. A number of examples:
Type inference.
dynamic keyword.
Delegates.
Optional parameters.
Lambda and LINQ (I actually have no idea what these are).
Properties.
However Java doesn't really feature anything that C# doesn't have.
My question is: why does C# have much more native features than Java? And why didn't Java add some of these throughout the years, for example Properties or type inference? Do the Java language designers take a more simplistic approach? What is the reason for this?
Explanation / Answer
Several reasons:
C# came later than Java; version 1 was a blatant rip-off of Java 1.4, so it pretty much had everything Java had at that point.
But then C# developed much faster than Java, because it was an exciting new platform (and had an utterly brilliant driver in Anders Hejlsberg, the father of Turbo Pascal). That allowed them to avoid all the mistakes in Java that had become obvious, while adding everything that Java practitioners wished they had.
Meanwhile, Java was hampered by very strict backward compatibility goals and by a somewhat slower pace of development, partly because it tried desperately to gain a reputation for being the standard, enterprisey, reliable, non-surprising solution for the 95% of non-genius programmers. At this they succeeded, perhaps a bit too well.
The result is that Java now has a bit of a feature gap. It does have huge plans for the future, but as usual with this sort of thing everything takes a bit longer than planned.