Looking Forward to Java in 2018

Credits : Infoq

 

As 2017 draws to a close, let’s look at the future of the Java platform in 2018.

We enter 2018 after a year that has brought more change to the Java world than is usual. In part this is due to the arrival of Java 9, albeit almost a year late.

However, over time, this release may come to be seen as less significant than the changes to the release cycle that accompanied the new version. This change to the release process means that there will be not one, but two, new releases of Java in 2018.

The first will be known as Java 10 with the second release being Java 11. Although this naming scheme may seem like the existing status quo, it was only achieved after a significant public debate and an eventual consensus being reached.

As a result of this switch to a strict time-based cadence, the content of each Java feature release is expected to become smaller in scope than has historically been seen until now. For Java 10 in particular, this means that the number of features is fairly small.

InfoQ previously covered the major items and since then only minor (Additional Unicode Extensions), tidy-up (removal of the native header generation tool and provide default root CA certificates), experimental (Graal – a Java-based JIT compiler) or currently-niche features (support for heterogeneous memory architectures) have been added to the release.

For Java 11, the set of features being considered for the release is even more nebulous, with only these few features currently in scope:

Epsilon (a reference implementation of a null GC algorithm)
Dynamic Class File Constants (a platform feature, primarily of interest to library writers and invokedynamic hackers)
Runtime tracing of JIT compilation events
This list will surely fill out as the release date approaches, but one feature that is noticeable by its absence is Java value types. This is perhaps unsurprising, as value types are a major change to the Java language and runtime and offer a complete re-imagining of aspects of the Java type system, including generic types.

The current prototype, while working, is still a very long way from being delivered, and in its current state is suitable only for low-level platform hackers and those comfortable hacking with reflective or MethodHandle-based tools. It seems quite inconceivable that, given the current state that value types will ship as part of Java 11, although Oracle has not made any public comments about when they expect value types to arrive.

However, if value types are not delivered as part of Java 11 then this would have the knock-on effect that the first long-term support release to include value types would not then appear until at least September 2021.

At time of writing it is also unclear as to whether the proposed data classes feature will appear in Java 11 either. As described by Brian Goetz, the Java language architect:

Data classes are about disavowing complex, indirect relationships between a classes representation and its API contract; by doing so, the compiler can fill in common class members.

There is some similarity between the proposal and Scala’s case classes, but Goetz makes it clear that the design space being addressed by data classes covers a range of possibilities and the overall semantic meaning of the data classes feature is deeper than it might appear. The current conception of data classes makes them deeply connected to the pattern matching feature also in development but they could potentially be delivered in separate releases.

Related to both features is the possibility of an enhanced form of switch – allowing the construct to be used as an expression as well as a statement.
This feature is relatively small and looks as though it could plausibly be delivered in Java 11, even without data classes or pattern matching but at present it is still only a draft JEP.

The feature-complete date for the eventual September release is in June 2018, so we will have to wait and see for a few more months before the overall shape of Java 11 becomes clear.

This article is shared by www.itechscripts.com | A leading resource of inspired clone scripts. It offers hundreds of popular scripts that are used by thousands of small and medium enterprises.


Warning: Missing argument 1 for cwppos_show_review(), called in /home/blogit/public_html/wp-content/themes/flat/content-single.php on line 29 and defined in /home/blogit/public_html/wp-content/plugins/wp-product-review/includes/legacy.php on line 18

Leave a Reply

Your email address will not be published. Required fields are marked *