In our earlier eMag, we discussed "Innovations That Have Already Been Delivered", covering a number of features that have arrived since Java 8.
This time, we want to talk about "Innovations That Are On Their Way". This includes massive, root-and-branch changes such as Project Valhalla as well as some of the more incremental deliveries coming from Project Amber such as Records and Sealed Types.
Making changes to a mature language such as Java is difficult - and this difficulty is only compounded by the fact that Java is so widely used and places great value upon backwards compatibility as a language virtue.
The twin-track approach that Valhalla and Amber represent is a pragmatic solution to this problem. Valhalla is about making deep and fundamental changes to the JVMs model of memory and storage and not being shy about facing the wide-ranging consequences that result from those changes. This means that it is not feasible to deliver very much of Valhalla in an incremental way - instead it is very much a "big bang" project.
On the other hand, Amber is about adding new semantics and syntax to the Java language with relative minor changes to the VM and classfile format. This lends itself much more easily to an incremental approach, and for the pieces to be delivered using the Preview Features mechanism.
We will look at both approaches - starting with a piece from the archives that shows how we imagined a possible future back in 2015. We'll then take a deep dive into two of the biggest in-flight changes happening in the JVM - inline classes and records (representing both Valhalla and Amber).
To close the loop on our original predictions, we'll then discuss how the other proposed enhancements have fared. Finally, we'll conclude with some recent reports on new directions for the platform and language that may yet arrive in the coming months and years.
Free download
The InfoQ eMag - Java Innovations That Are on Their Way include:
- Java's Missing Features: Five Years Later - Ben Evans revisits his take on Java's Missing Features from 2015 and compares how the language has evolved compared to his observations at the time.
- Java: The Missing Features - In this article, we look at some of the "missing features" of Java, as well as the work, if any to remediate those.
- A First Look at Java Inline Classes - Java currently supports only two types of value: primitives and object references. Project Valhalla extends this by introducing inline classes which are a new form of type that exhibit some behaviors of both. These new types open the door to better alignment with modern CPUs and considerable potential performance improvements for Java applications.
- Java 14 Feature Spotlight: Records - Java SE 14 (March 2020) introduces records (jep359) as a preview feature. Records aim to enhance the language's ability to model "plain data" aggregates with less ceremony. In this article Java Language Architect Brian Goetz takes a deep dive into the feature.
- Brian Goetz Speaks to InfoQ about Proposed Hyphenated Keywords in Java - On his continuing quest for productivity and performance in the Java language, Brian Goetz, Java language architect at Oracle, along with Alex Buckley, specification lead for the Java language and Java Virtual Machine at Oracle, proposed a set of hyphenated keywords to evolve the language as new features are added. Goetz spoke to InfoQ about these proposed hyphenated keywords.
- TornadoVM: Running Java on GPUs and FPGAs with Dr Juan Fumero at QCon London - Dr Juan Fumero presented at QCon London on TornadoVM, a plug-in to OpenJDK and GraalVM that runs Java on heterogeneous hardware including Graphical Processing Units (GPUs) and Field Programmable Gate Arrays (FPGAs). Demos during the presentation showed code being sped up by hundreds of times when running on a GPU vs a CPU.
InfoQ eMags are professionally designed, downloadable collections of popular InfoQ content - articles, interviews, presentations, and research - covering the latest software development technologies, trends, and topics.