News

Oracle's 'Valhalla' Experimental OpenJDK Project Focuses on Generic Types

Brian Goetz, Oracle's Java language architect, has been talking for quite a while about the need for new features in Java and the Java Virtual Machine (JVM) to improve its typing system on several fronts and make the language more efficient at handling situations requiring identity-less types. Now Oracle has officially announced Project Valhalla for Java, an experimental OpenJDK project for advancing some of Goetz's (and others') ideas, including a major overhaul of Java's generics, a new approach to generic typing, and new support for value types.

Goetz detailed some of his ideas about generic typing, which would allow developers to use generic collections of primitive types, and is probably better known as "generic specialization," in a paper published on the Web this summer ("State of Specialization"). He called it "an informal sketch" of his proposed Java/JVM enhancements to support generics over primitives and, eventually, value types. In another paper ("State of Value Types"), Goetz, along with Oracle engineer John R. Rose and Oracle software architect Guy Steele, laid out a set of proposed enhancement to the JVM instruction set to support small, immutable identiy-less value types.

Although Goetz suggested in a June post to an Oracle mailing list that the initial source of the project would be based on a clone of a JDK 9 repository, Goetz wrote in a subsequent post that none of the changes developed in the Valhalla project are aiming for Java 9. "This is the early-stage explorations of stuff that hopefully will make it into a later release," he wrote.

Martijn Verburg, CEO of jClarity, a startup focused on automating optimization for Java and JVM–related technologies, and co-leader of the London Java Users' Group, sees great potential in the project "to ensure that Java and the JVM remains the leading platform of choice for developers from small devices to big iron."

"In the past few years many Java/JVM developers have been discussing the JVM's weaknesses when it comes to mechanical sympathy," Verburg told ADTmag in an email. "For example, how the JVM interacts with the O/S and hardware with regards to performance. Goetz et al have lead/participated in many of these conversations, and project Valhalla will take the first concrete steps towards closing the gap for Java/JVM and tightly written native applications with the proposed implementations of value types and many other small enhancements."

"Programming language design and implementation is the closest thing we have to rocket science in computing," said IDC analyst Al Hilwa. "How languages work is a key factor in their adoption and success. Java does need to evolve, and it's good to see these kind of discussions in the open, which is a validation of the openness of the process at this point."

Valhalla is an experimental project, and Goetz is clearly trying to manage expectations as it gets off the ground. "As the prototypes emerge, please bear in mind that the first several  rounds will likely not look anything like the final result," he wrote. "So, don't  assume that just because the prototype operates by name mangling, or classfile mangling, or requires the operator to do the Chicken Dance, that this is the ultimate plan -- its just an expedient way to get to  the point where we can experiment with something tangible."

Developers interested in joining the prototyping phase of the Valhalla project will want to join the valhalla-dev mailing list, which is hosted on the OpenJDK website.

About the Author

John K. Waters is a freelance author and journalist based in Silicon Valley. His latest book is The Everything Guide to Social Media. Follow John on Twitter, read his blog on ADTmag.com, check out his author page on Amazon, or e-mail him at john@watersworks.com.


comments powered by Disqus
Upcoming Events

AppTrends

Sign up for our newsletter.

I agree to this site's Privacy Policy.