[foreign] thoughts on finalizing foreign APIs

Paul Sandoz paul.sandoz at oracle.com
Fri Sep 17 15:57:20 UTC 2021


Very nice. The end-game for FML is in play :-) after the first round play in JDK 14 one and a half years ago.

I prefer we get the API we think is right and we can support for decades. Taking an extra release cycle is a small cost in comparison to that.

With regards to being in java.base, I would like to emphasize the very important use-case of using FML within java.base for new APIs or for implementations. The java.base module is where many of the foundational innovations occur in harmony with the language and runtime.

Paul.

> On Sep 16, 2021, at 7:59 AM, Maurizio Cimadamore <Maurizio.Cimadamore at Oracle.COM> wrote:
> 
> Hi,
> we have spent the last few weeks looking at the foreign APIs more holistically, to see what we could do to improve them, in order to get them preview/finalization ready. The resulting changes are described in the following write up:
> 
> https://inside.java/2021/09/16/finalizing-the-foreign-apis/
> 
> We think the proposed API [2, 3] is much simpler, tighter and safer - while retaining the same expressiveness of the existing API.
> 
> Moving forward, we would like to start integrating the proposed changes into the panama repo, and incubate those changes in 18. We will then (finger crossed!) move towards finalizing the API, by making it a preview API in 19 (the document describes some basic shuffling moves on how we might want to do that). While we could technically preview things in 18, we believe that the extra steps required to move the API into java.base would push us too close to the code freeze deadline; besides there are still outstanding performance issues (such as [1]) which we'd like to have addressed, so that user experience can be as smooth as possible. For these reasons, incubating in 18 and previewing in 19 seems like the most sensible option at this point in time.
> 
> Cheers
> Maurizio
> 
> [1] - https://bugs.openjdk.java.net/browse/JDK-8259609
> [2] - http://cr.openjdk.java.net/~mcimadamore/panama/foreign-finalize-javadoc/javadoc/jdk/incubator/foreign/package-summary.html
> [3] - https://github.com/mcimadamore/panama-foreign/tree/foreign-finalize%2Bjextract
> 
> 



More information about the panama-dev mailing list