While looking at the bar graph from most recently completed Java.net poll about Java 8 implies a fairly strong consensus, in actuality I think this poll implies that there's quite a lot of disagreement on which aspect(s) of Java 8 are most important for Java/JVM developers going forward. A total of 245 votes were cast in the poll, and two well thought out comments were posted. The exact question and results were:
What's the most important new feature in Java 8?
- 42% (105 votes) - Lambda Expressions
- 18% (44 votes) - The Stream API
- 5% (13 votes) - Compact Profiles
- 4% (10 votes) - Security Enhancements
- 2% (5 votes) - Nashorn Javascript Engine
- 4% (10 votes) - Some other new feature
- 9% (23 votes) - I can't pick just one new feature
- 15% (36 votes) - I don't know
Before interpreting these numbers, I'd like to bring in the two comments that were posted, because these, I think, reflect the fact that Java 8 is actually a fairly complex release, with a greater breadth than we might have really been aware of back in the days when the disappointment over the postponement of Project JigSaw to a later release was dominating people's thinking.
Java.net user rdohna
posted the first comment:
Lambda and Stream API are probably most talked about, but parameter reflection, date&time API, and type annotations are probably even more important, as they have been missing most from a modern language.
This immediately gets to my point: yes, Java 8 has at least one "blockbuster" feature (Lambda Expressions), and it does not include the originally-intended second "blockbuster" (Project JigSaw, although imo Compact Profiles are actually a pretty good step in that direction). But, rdohna
's point is that a number of significant modern language deficits in Java are addressed in Java 8.
It's interesting to note at this point that ThoughtWorks Director / Software Architect / Meme Wrangler Neal Ford appended his "Java.next" series, which originally focused on Groovy, Scala, and Clojure as "your next programming language," to include Java 8 once he saw what the actual Java 8 release includes. See his Java.next: Java 8 as Java.next post, which we featured on Java.net last week for the details of his thinking.
Java.net user lbastendorff
posted the second comment:
For me lambda expressions are good but annotations on types, parameters in reflection and default methods are the real big things. Unfortunately project coin still has not made it in as the ?. Operator would make my life so much easier. The new date time library might be nice if the system I spend my working life on wasn't so massive and entirely written around joda time. Migrating the system to JDK8 was not to hard though and we have already made extensive use of default methods in order to tidy up some of our own api's. This is working well on our internal alpha servers but will still be a few months from reaching any live client systems.
Here, we see a statement that Java 8 follows easily on Java 7 in terms of migration, but with a suggestion that Java 9 should do more than include a blockbuster feature, because there are still many more smaller language issues that need to be addressed.
Going back to the numbers, imo Lambda Expressions are critical, because that's what facilitates writing Java applications that are easily scalable on today's and the future's multicore devices. That was a critical need, I don't think anyone can deny that. But, just look at the voting. For a great many developers, other Java 8 enhancements are critical, and will significantly benefit their development efforts, and probably their careers.
What I really like about Java 8 is that it goes the extra kilometer/mile in attempting to keep Java relevant as a modern language. Yeah, Java has such a huge installed base that the COBOL/Fortran/C path is available: maintain security and stability on modern operating systems and hardware, and you just drift on into the future (with your legacy code persisting largely through its being wrapped in modern language containers), because it's prohibitively costly for companies to do otherwise (i.e., fully migrate the legacy code from Java to another language). But, this is not the path that's been selected for Java. Hence, Neal Ford's suddenly thinking "Hey, wait a minute -- Java 8 itself may be the future!"
Java 8 is a remarkable, and a remarkably diverse, innovation!
Now, Java 7 was cool -- least not because it proved to us that Java 6 wasn't going to become a more or less 'final' baseline version (like Fortran 77). But, with Java 8, Java and the JVM are exploring new, thoroughly modern territory. That's something to be very excited about.
Having programmed threadsafe code for 8-processor Sun Solaris machines starting more than 20 years ago (writing C code that actively managed threads and signals, etc.), I remain amazed at how brief a syntax the Lambda Expressions team produced to enable Java developers who don't really understand (and who may not want to understand) the intricacies of multithreaded programming to go out and now develop reliable threadsafe code. To add some syntax that directs the libraries to implement threadsafe execution was ingenious, imo. I, having dealt with developing that multithreaded code in C 20 years ago, consider Java 8's Lambda Expressions a monumental achievement.
I really hope Java 8 quickly becomes the predominate version. Companies should jump to Java 8 from all earlier versions if they want to stay relevant in today's multicore world, imo. But, as I said, and as the poll indicates, Java 8 contains so so much more!
New poll: non-Java JVM languages
Both Java 7 and Java 8 include many JVM enhancements that benefit non-Java JVM languages as well as Java itself. Our current poll prompts you to respond to The best reason to use a non-Java JVM language is... Voting will be open until Friday, May 16.
What Java.net poll would you like to see?
If you have a poll idea, get in touch with me by commenting on this blog post, or by sending an email to editor _at_ java.net, or by using our Submit Article/Blog form.
Subscriptions and Archives: You can subscribe to this blog using the java.net Editor's Blog Feed. You can also subscribe to the Java Today RSS feed and the java.net blogs feed. To follow Java.net net on Twitter, follow @javanetbuzz.