Project Valhalla

Valhalla – For those who played Valkyrie Profile (an RPG for PlayStation released in 1999 whose story was based on the Norse Mythology) would know that it is a huge hall or also called “the hall of the slain” in Asgard that houses chosen dead people who will help god Odin in the event of Ragnarok.

However, in the world of Java, Valhalla a.k.a. Project Valhalla is not really a hall but rather a place to “explore and incubate advanced Java VM and Language feature candidates such as Value Types, Generic Specialization and enhanced volatiles” instead of housing dead people. Project Valhalla is a project led by Oracle’s Java Language Architect Brian Goetz and sponsored by the HotSpot Group which has been proposed and announced on the OpenJDK mailing list in July 10, 2014.

The current versions of Java use the “type erasure” approach to generic typing which gained criticism among the features of Java’s type system because it “only allows generic types to contain reference types, and the Java compiler removes the details of the contained type during compilation”. Therefore, one of the initial proposed features of Valhalla is the Generic Specialization , an enhancement to the Java Language that will support generics over primitives. You can read additional information about this feature on this draft.

Value Types is another main feature proposed for Valhalla. An initial draft called State of the Values written by John Rose, Brian Goetz, and Guy Steele was released in April 2014. It is an enhancement for the Java Virtual Machine that aims “to support small immutable, identityless value types”.

Unfortunately, none of the features will be in Java 9 but Goetz is hoping that their explorations will lead to the inclusion of Valhalla in Java’s future releases.

They will soon start the experimentation or trial and error through prototyping of these features and Goetz reminded that first rounds of prototypes will probably not show the final result.

To those interested developers who want to join Valhalla’s technical discussions or get updates, you can subscribe at valhalla-dev mailing list.

Posted in Technology.

Leave a Reply

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