BT

InfoQ Homepage News Oracle Launches Project Valhalla for Java

Oracle Launches Project Valhalla for Java

Leia em português

This item in chinese

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

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.

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

Community comments

  • Awesome!

    by C Curl /

  • Value types

    by Luke deGruchy /

  • As with everything else

    by Will Hartung /

  • Java catching up?

    by Jon Okie /

    • Awesome!

      by C Curl /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      been waiting for this since forever

    • Value types

      by Luke deGruchy /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      Market share retention?

    • Re: Java catching up?

      by Luke deGruchy /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      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 /

      Your message is awaiting moderation. Thank you for participating in the discussion.

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

    • Re: Java catching up?

      by Ben Evans /

      Your message is awaiting moderation. Thank you for participating in the discussion.

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

    • can I get an AMEN! on primitive collections ?

      by Nicholas Whitehead /

      Your message is awaiting moderation. Thank you for participating in the discussion.

      Ahh.... Trove... We love you, but are your days numbered ?

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

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

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.