On Mon, 20 Feb 2023 09:34:17 GMT, David Holmes <dhol...@openjdk.org> wrote:

> You can't introduce a new public API and then blame people for using it! If 
> the API is really only intended to support the internal implementation of a 
> language feature than make it private and don't export it.

There are a number of APIs that exist to support the Java Language. 
LambdaMetafactory makes it clear in the first paragraph of its API docs that it 
supports the lambda expression and method reference expression features of the 
Java Language. If a Java compiler compiles these language constructs to 
invokedynamic instructions then the bootstrap methods have to be standard APIs, 
otherwise the class files won't work on all VM implementations. The APIs adding 
to j.l.runtime are similar. Maybe some advance tooling/framework might use them 
directly but it should be rare.

-------------

PR: https://git.openjdk.org/jdk/pull/12493

Reply via email to