First Loki

Brian Goetz introduces new OpenJDK project ‘Valhalla’

JAX Editorial Team
viking

Goetz proposes heroic effort to tackle language extensions for the Java language and JVM.

 

Brian Goetz has formally
proposed
a new OpenJDK project, going by the
name of  
Valhalla.
Although the name brings to mind images of long dead heroes, this
project is very much about catalysing major innovations in the
future.

And, for the Java community at least, there’s
also the very real possibility that, through this initiative,
extensions to the Java language and Java virtual machine could be
achieved. According to the Oracle Language Architectural Kahuna,
this corresponding code repositories will be available
soon.

March of the Value Types

A subproject of Valhalla, which goes under a
similar class, both faceless and unchangeable (immutable) value
types or ‘ValueTypes’ is another feature signposted by Goetz in his
keynote at JAX 2014 as “the next big target” on the roadmap for
Java.

In a presentation on the introduction of Value
Types  last April,  Goetz describe the efforts in this
regard as follows:

“The goal of this effort is to explore how small
immutable user-defined aggregate types without identity can be
surfaced in the language and the JVM instruction set to support
memory- and locality-efficient programming idioms without
sacrificing encapsulation.

We believe that the design of the Java VM and
language can be gently extended with a new kind of type, a value
type, which usefully combines the properties of Java’s current
classes and primitive types.”

To date, so-called “primitives” (  byte ,
short ,  int ,  long ,  float ,  double ,
 char  and  boolean ) are the only faceless data
types in Java.

The five introduced with Java generic types or
generics will, with the help of Valhalla, be extended to primitive
types. So far, generic types can only be made compatible with
 ”Boxing” or “boxing” primitive types, which negatively
affects the performance – especially after the introduction of
Value Types. 
A first draft of the Valhalla project has
been
published
by Goetz. Click here if you’d like a glimpse.

Comments
comments powered by Disqus