BT
x Your opinion matters! Please fill in the InfoQ Survey about your reading habits!

Oracle Launches Project Valhalla for Java

by Ben Evans on Jul 28, 2014 |

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.

 

 

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Tell us what you think

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Awesome! by C Curl

been waiting for this since forever

Value types by Luke deGruchy

I really hope they find a way to get value types into JDK 9. This will benefit not only Java, but other JVM languages as well. It would be beneficial to have small, immutable struct-like object that can be allocated to the stack.

As with everything else by Will Hartung

Call me in 3 years when this finally rolls out. Call me in 5 when it's starts to hit production systems.

Java catching up? by Jon Okie

In other words, they are trying to see if Java can do what all of the .Net languages can do already.

Re: Java catching up? by Luke deGruchy

Another way of looking at it is that Oracle is investing in Java and the JVM in a way that Sun would not/could not.

As for .NET, well, many companies don't have the option of switching as their servers don't run Windows, and Mono is too much of a hack to be a viable option.

In other words, they are trying to see if Java can do what all of the .Net languages can do already.

Re: Java catching up? by Jon Okie

That is a good point. I do however wonder what Oracle's plans are for getting a return on that investment.

Re: Java catching up? by Victor Grazi

Market share retention?

Re: Java catching up? by Luke deGruchy

I wonder how much of that is retaining JVM users as opposed to Java language users. Oracle put out some promotion for Java stating that Tweeter uses the JVM for development (they use Scala).

Market share retention?

Re: Java catching up? by Ben Evans

Well, in the area of Value Types at least, there's some second mover advantage. The JVM ecosystem can definitely learn from the implementation flaws of the .NET approach, and I think that's explicitly called out in one of the design docs.

Re: Java catching up? by Jon Okie

Oh, that's good. So what specifically are they improving on?

Re: Java catching up? by Ben Evans

Hang on, I'll see if I can dig out the specific mention and post it to this thread.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Email me replies to any of my messages in this thread

11 Discuss

Educational Content

General Feedback
Bugs
Advertising
Editorial
InfoQ.com and all content copyright © 2006-2014 C4Media Inc. InfoQ.com hosted at Contegix, the best ISP we've ever worked with.
Privacy policy
BT