Draft JEP: Incubating Language and VM Features

Joseph D. Darcy joe.darcy at oracle.com
Mon Jan 22 22:55:42 UTC 2018


On 1/19/2018 5:04 PM, Alex Buckley wrote:
> "Incubation is not a mechanism for experimentation and risk-taking."
>
> An incubating feature has evolved beyond a successful experiment. 
> We're sure enough of its scope and quality to commit it to the Java SE 
> Platform. Any number of the mature language features in recent years 
> could have been incubated to get that last ounce of feedback from 
> developers. Yes, we have to admit the possibility that an incubating 
> feature might be dropped -- "Sounds like a failed experiment!", I hear 
> you cry -- but there is no sense with an incubating feature of 
> tinkering, rough edges, version 0.1 quality, unsupported status, etc.
>

I'd like to illustrate the benefits of an incubator for language 
features using the development of one of the Project Coin features, 
try-with-resources.

The try-with-resources statement was the largest of the Coin features. 
In August of 2010, early access builds JDK 7 had a full implementation 
of the try-with-resources feature, with a detailed specification, 
compiler implementation, and library support. Feedback on using the 
feature was solicited on various channels. [1]

The most substantial feedback came five months later about null handling 
of the statement. [2] (HT Rémi) The following month, after due 
consideration the expert group for JSR 334 decided to change the null 
handling semantics as suggested. [3]

JDK 7 was a multi-year release and could accomodate and act on feedback 
provided several months after a production-quality implementation of the 
feature was available for use. However, the timeline of feedback above 
would of course be problematic to act on within a six-month release cycle.

Without an incubation facility, with a six-month release cycle it is 
unlikely feedback received at that relative time could be reflected in 
the GA build. That would leave two general options: live with the 
suboptimal original semantics of the feature or, in a future release, 
make an incompatible change to the language feature, one of the kinds of 
changes the platform has generally avoided.

An incubation facility provides a helpful path to offer solid features 
for feedback before all the details need be written in stone.

Cheers,

-Joe

[1] 
https://blogs.oracle.com/darcy/project-coin%3a-try-out-try-with-resources,
http://mail.openjdk.java.net/pipermail/coin-dev/2010-August/002822.html

[2] http://mail.openjdk.java.net/pipermail/coin-dev/2011-January/002961.html

[3] 
http://mail.openjdk.java.net/pipermail/coin-dev/2011-February/003077.html



More information about the jdk-dev mailing list