The Final Five (or so)

Joseph D. Darcy Joe.Darcy at Sun.COM
Fri Aug 28 17:44:51 PDT 2009

First, thanks to all those who submitted interesting proposals and 
thoughtful comments to Project Coin; a demonstrably vibrant community 
wants to evolve the Java programming language!

Without further ado, the final Project Coin changes accepted for 
inclusion in JDK 7 are:

    * Strings in switch
    * Automatic Resource Management
    * Improved Type Inference for Generic Instance Creation (diamond)
    * Simplified Varargs Method Invocation
    * An omnibus proposal for better integral literals
    * Language support for Collections
    * Language support for JSR 292

The specification, implementation, and testing of these changes are not 
final and will continue to evolve as interactions are explored and 
issues cleared. Two of the listed items are combinations of multiple 
submitted proposals. The omnibus proposal for improved integer literals 
includes at least binary literals and underscores in numbers; a way to 
better handle unsigned literals is desired too. Language support for 
Collections covers collection literals and allows for developing 
indexing access for Lists and Maps, assuming the technical problems are 

That leaves a few proposals that went through further consideration, but 
were not accepted on the final list:

    * Improved Exception Handling for Java
    * Elvis and Other Null-Safe Operators
    * Large arrays

Improved exception handling would be a fine change for the language, but 
it ventures near the type system and we do not estimate we have 
resources to fully develop the feature within JDK 7. I would like to see 
improved exception handling reconsidered in subsequent efforts to evolve 
the language. While the Elvis operator and related operators are helpful 
in Groovy, differences between Groovy and Java, such as the presence of 
primitive types and interactions with boxing/unboxing render the 
operators less useful in Java. JDK 7 will support other ways to ease the 
pain of null-handling, such as the null checking enabled by JSR 308. 
Aggregates natively supporting more than 32-bits worth of entries will 
no doubt be increasingly needed over time. Language support for 
collections may allow such facilities to be developed as libraries until 
the platform directly handles large data structures.

The coin-dev list will remain available for the continued refinement of 
the accepted changes. Further discussion of proposals not selected is 
off-topic for the list.

The majority of the implementation of the Project Coin changes should be 
in JDK 7's development Mercurial repositories by the end of October 2009.

In due course, we intend to file a JSR covering the Project Coin changes.

More information about the coin-dev mailing list