Project Coin

Project Coin, started by Oracle’s Joseph Darcy in 2009, is a project that determined the “set of small language changes” that should be added to JDK 7 wherein final list of features where determined on the same year. The following are the Project Coin’s features that were added to JDK 7:

String in switch

This feature allows to switch string values, an ability similar to the existing switch on values of the primitive types.

Automatic Resource Management

Using the Automatic Resource Management statement, resources can be closed automatically.

Improved Type Interference for Generic Instance Creation (diamond)

The addition of limited type interference for class instance creation expression to the Java programming language will be addressed in this feature.

Simplified Varargs Method Invocation

This will lessen the confusion on the programmers by moving the warning from the call site to the method declaration.

An omnibus proposal for better integral literals.

Includes binary literals and underscores in numbers

Language support for Collections
Includes collection literals and indexing access for Lists and Maps.

Language support for JSR 292

Involves invokedynamic instructions, method handle invocation, certain relaxed conversions, and exotic identifiers.

Other proposed and selected features were submitted for reconsideration for JDK 8.

Furthermore, Project Coin was also being considered in the upcoming JDK 9. The JEP 213 also known as Milling Project Coin is included in the recent list of JEPs targeted to JDK 9. JEP 213 by Darcy started in May 2014, this proposes four small amendments to the Java Programming Language such as:

  1. Allow @SafeVarargs on private instance methods. @SafeVarargs should be applied not only to static methods, final methods, and constructors but also to private methods.
  2. Allow effectively-final variables to be used as resources in the try-with-resources statement. The use of final variables will avoid the need to declare dummy in using the try-with-resources statement.
  3. Allow diamond with inner classes if the argument type of the inferred type is denotable.
  4. Underscore from the set of legal indentifier names will be completely removed.

Click on the links to get updates and more information on the following: JEP 213 and JDK 9.

Posted in Technology.

Leave a Reply

Your email address will not be published. Required fields are marked *