Oracle Seeking Community Input for JDK 8
With Java 7 now feature complete, Oracle is starting to shift some attention to JDK 8, and Mark Reinhold, chief architect for the Java platform group, is asking for input from the Java community.
We already know what some of the big-ticket items are likely to be. There'll be room for other features too, however, both large and small. It's therefore time to define a simple process for collecting, sorting, reviewing and prioritizing proposals and plans for new features, for JDK 8 and for later releases.
The process should be "as lightweight as possible" with "simple mechanics", as well as "open to all committers, with transparent decision-making," Reinhold said and, for now, the proposals can be collected in a Mercurial repository as structured text files.
The "big-ticket" items Reinhold refers to are mainly items that proved too difficult, or too controversial, for inclusion in JDK 7. The main items are likely to be a Java platform module system, and the addition of lambdas (otherwise known as closures or anonymous methods).
Providing a module system was one of the main aims for Java 7, but proved highly controversial since Sun chose to develop its own solution, Jigsaw, rather than work with the pre-existing OSGi. Sun gave two reasons for this. The first was that they wanted to be able to bind the packaged application more to the platform on which it is to run than OSGi does, so that desktop applications written in Java would appear more as first class citizens on the various platforms which Java supports. The second was that the dependency models in the two systems are different. Sun needed to be able to split packages into different modules and have them loaded into the same classloader at runtime - so for example a package like java.util might be split into different modules (or even different implementations for memory constrained devices). To support this Jigsaw has a concept of a local dependency which is recursive. So if module 'Swing' has a local dependency on module 'AWT' and module 'AWT' has a local dependency on module 'base', then at runtime modules Swing, AWT and base will all end up in the same classloader. OSGi does have a similar concept in the form of fragments, but these are much less flexible in that they cannot themselves express dependencies. Of course it may be possible for OSGi to add support for these additional requirements, but whichever approach is taken Oracle does look to be aiming for an approach that is OSGi-compatible. The Java 8 JSR states
The extent to which the Java Platform Module System should adopt, interoperate with, or otherwise accommodate OSGi will be a topic for that JSR's Expert Group and the Java SE 8 Expert Group to discuss and decide.
The plan to add lambda expressions to the language saw a wide range of proposals (BGGA Proposal | CICE Proposal | FCM Proposal | C3S Proposal), but no clear agreement emerged as to which approach should be taken. Project Lambda, and the accompanying JSR 335, will look again at the problem. As part of this work there is a proposal to add support for a "SAM conversion", to allow lambda expressions to be used where a single-abstract-method interface or class is expected, enabling forward compatibility of existing libraries. The JSR also proposes extending the semantics of interfaces in the Java Language to support virtual extension methods. These would allow an interface to nominate a static default method to stand in for the implementation of an interface method in the event that an implementation class does not provide an implementation of the extension method.
Away from these major items the JSR talks about:
- More small enhancements from Project Coin. This is likely to include Josh Bloch’s Collection Literals proposal, which aims to add support for immutable List, Set and Map literals, with a syntax similar to that of array initializers. We may also see a revival of the source-code syntax for the new JVM features in JSR-292.
- Type Annotations (JSR 308): Extends Java's annotation system to permit annotations to appear on any use of a type.
- New Date and Time API (JSR 310).
- Swing JDatePicker.
We also expect to see Oracle continuing to build up Java's support for parallel programming, adding support for automatically parallelizable bulk-data operations such as filter, map and reduce.
Speaking at EclipseCon, Reinhold stated Oracle's top goal is to keep Java a number-one language and platform.
Oracle has 20,000 Java developers working for the company, everything except the core database is written in Java. If that were to decline... that would be a significant re-investment
Java 8 is expected in late 2012.
Anatole Tresch Mar 03, 2015