Incubator Module vs. Preview Feature in Java

2.8k views Asked by At

JEP 11: Incubator Modules:

Summary

Incubator modules are a means of putting non-final APIs and non-final tools in the hands of developers, while the APIs/tools progress towards either finalization or removal in a future release.

Goals

Enable JDK Release Projects to distribute a limited set of APIs and tools that ("are" is probably missing on the website) not final and complete, and which would benefit from developer or user feedback. This will reduce the chance of costly mistakes in the Java SE Platform and the JDK.


JEP 12: Preview Features:

Summary

A preview feature is a new feature of the Java language, Java Virtual Machine, or Java SE API that is fully specified, fully implemented, and yet impermanent. It is available in a JDK feature release to provoke developer feedback based on real world use; this may lead to it becoming permanent in a future Java SE Platform.

Goals

Allow Java platform developers to communicate whether a new feature is "coming to Java" in approximately its current form within the next 12 months.


I am wondering what is the point of having these two, conceptually (even semantically), quite similar aspects, separately?

Yes, JEP 12 has more Goals, slightly different definition and summary; and it seems to have closer connection with JVM internals; however, still, these two JEPs seem quite overlapping to me.

Any ideas?

1

There are 1 answers

0
StevenV On

Answer from Stuart Marks:

Incubation applies to modules, and a preview feature is something that is more closely tight in with the language and the libraries.

Followed up by Brian Goetz:

Preview features are really finished but are waiting for a round of feedback whereas the incubator mechanism has more room to iterate over the api several times to get feedback.

Source: Video from Devoxx where the Java architects answer this question: