The Artima Developer Community
Sponsored Link

Cool Tools and Other Stuff
JavaOne 2010: Upcoming Java Features
by Eric Armstrong
September 23, 2010
Summary
An overview of upcoming features in Java.

Advertisement

In the Java booth, Jim Holmlund gave me an overview of upcoming features in Java. (Luckily for me, he had a copy of the speaker's slides. So it made up for the session I missed in the morning.)

Some of what's coming is pretty cool. Some is a bit dissapointing, compared to what I was hoping for. Here's my notes:

Java 7

Java 7 will get a variety of small language enhancements that are part of the COIN project:

So my expectation for "type inferencing" was that it would work sort of like Ruby or Scala. If f(x) returns an ArrayList of String, then there would be no need to code ArrayList<String> list = f(x).

Instead, you would just code list = f(x), like you used to, and the compiler would figure it out..

No such luck. Instead of inferencing from right to left, as I expected, it works the other way around.
Instead of specifying this: List<List<String>> list = new ArrayList<List<String>>();
You'll be able to specify this: List<List<String>> list = new ArrayList<>();

Granted, it's an improvement. But it's a pretty small improvement. And it's not even really type inferencing. Instead, it's type deduction: If you tell the compiler what the type is on the left side of the assignment, it can figure out what the type has to be on the right side, a few characters later. I should hope so. Pardon my disappointment, but I was looking for a lot more.

Java 8(ish)

That's an important step towards functional programming capabilities, of course. But it's only one of several steps that are needed, and it's going to be a year or two before Java 8 is available. (For more on that subject, see the next report.)

Next: Functional Programming, from Java to Scala

Talk Back!

Have an opinion? Readers have already posted 47 comments about this weblog entry. Why not add yours?

RSS Feed

If you'd like to be notified whenever Eric Armstrong adds a new entry to his weblog, subscribe to his RSS feed.

About the Blogger

Eric Armstrong has been programming and writing professionally since before there were personal computers. His production experience includes artificial intelligence (AI) programs, system libraries, real-time programs, and business applications in a variety of languages. He works as a writer and software consultant in the San Francisco Bay Area. He wrote The JBuilder2 Bible and authored the Java/XML programming tutorial available at http://java.sun.com. Eric is also involved in efforts to design knowledge-based collaboration systems.

This weblog entry is Copyright © 2010 Eric Armstrong. All rights reserved.

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2014 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us