A couple of weeks ago, I detailed the major features we can look forward to in Java 8. What I didn't say was that .Net has most if not all of those Java 8 features, as well as many other features deferred to Java 9. I'm not a big fan of adding everything but the kitchen sink to the Java language. However, I think the Java platform (as opposed to the language) should evolve to support these features. I also think .Net is a great technology, and C# and the .Net platform accomplished in many ways what they set out to do, which was to become Java 3. My biggest misgiving is that I've never liked Microsoft's operating system, and I loathe bugs I can't -- in theory -- fix.
A tale of two platforms
You could make the claim that with a smaller install base and a greater willingness to rip the rug out from under developers, Microsoft can afford to move more quickly. Some of that is fair. I remember in the '90s and early 2000s, Microsoft decided we needed to change database APIs almost weekly from ODBC, RDO, ADO, to OLEDB and so on. Yet with .Net, Microsoft reached a kind of critical mass, and the faster progress has continued.
[ Also on InfoWorld: Love and hate for Java 8. | Think you know Java? Test your programming smarts in InfoWorld's Java IQ test. | Master the latest in Java development with our JavaWorld Enterprise Java newsletter. ]
But how did Java fall so far behind? The early days of Java were fast paced. From Java 1.0.2 to Java 1.1, we saw radical (and often incompatible) changes in only one year. Going from 1.1 to 1.2 took 1.5 years, and version 1.22 -- a more important release than its number suggests -- arrived a mere 7 months later. Just 10 months after came the pivotal release of Java 1.3; this was the first release with a garbage collector that had the server side in mind.
Java 1.4, which brought us NIO and
regexp, dropped in less than two years later. Java 1.4.2, which brought us garbage collectors for multicore environments (though not very stable ones), came out another year on. Yes, Java 1.5 made parallel and concurrent GC ready for production, and it added important concurrent and NIO features, but it took one more year.
Overall a good performance release, Java 1.6 made locking cheaper, but it was nowhere near as substantial as 1.5, and it required a two-year wait. Java 1.7 was the first major change to the underlying VM technology (the G1 collector) since 1.4.2, and it gave us
invokedynamic to better connect other languages on the JVM. However, as the major releases drifted from one to two to nearly five years apart, the pace was clearly slowing.
|Java feature||.Net or C# feature||Java version / release date||.Net or C# version / release date|
|java.util.concurrentFuture / ForkJoinPool / java.util.stream||Task Parallel Library||Java 5 / Sept. 30, 2004|
Java 7 / July 28, 2011
Java 8 / April 2014?
|.Net 4.0 / April 12, 2010|
|Lambda expressions||Lambda expressions||Java 8 / April 2014?||.Net 3.5 / Nov. 19, 2007|
|Strings in switch statements||C# switch||Java 7 / July 28, 2011||.Net 1.1 / April 24, 2003|
|Generics||Generics||Java 5 / Sept. 30, 2004||.Net 2.0 / Nov. 7, 2005|
|NIO||Asynchronous I/O||Java 1.4 / Feb. 6, 2002||.Net 2.0 / Nov. 7, 2005|
|Jigsaw||Assemblies and application domains||Java 9 / ?||.Net 1.1 / April 3, 2003 (subsequent incremental improvements)|