BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Oracle Launches Project Valhalla for Java

Oracle Launches Project Valhalla for Java

Leia em Português

Lire ce contenu en français

Bookmarks

Oracle have announced Project Valhalla for Java. This is an experimental OpenJDK project to develop major new features for Java that require both changes to the language syntax and VM-level support. Valhalla project lead Brian Goetz stressed that this is an early-stage experimentation project, and that the community should not necessarily expect any Valhalla technology to be available as part of JDK 9 (scheduled for 2016). The project is similar in intent to some existing OpenJDK projects such as Project Lambda and the DaVinci Machine project (which led to the invokedynamic functionality released in Java 7).

One of the initial features being discussed for Valhalla is a major overhaul of Java's generics. Current versions of Java only allow generic types to contain reference types, and the Java compiler removes the detail of the contained type during compilation. This approach to generic typing (known as type erasure) has been one of the most heavily criticised features of Java's type system.

Project Valhalla will explore a new apporoach to generic typing, and hopes to produce a new form of generic typing that allows developers to use generic collections of primitive types. The aim will be for types such as List<int> to be valid Java in some future release of the JDK. This feature, known as generic specialization, is already present in some other JVM languages and Java developers have been asking for it since generics first shipped with JDK 5.

The other big feature currently proposed for Valhalla is value types. These are intended to combine some of the properties of Java's object and primitive types, but to do so in such a way that developers can treat them as though they were just a new kind of user-defined primitive type. John Rose, Brian Goetz and Guy Steele have published an initial proposal for value types here.

The prototype phase of Valhalla features will be starting soon. Interested developers should join the valhalla-dev mailing list hosted on the OpenJDK site. Brian Goetz's initial announcement is here.

 

 

Rate this Article

Adoption
Style

BT