JEP proposed to target JDK 17: 406: Pattern Matching for switch (Preview)

forax at univ-mlv.fr forax at univ-mlv.fr
Tue Jun 1 20:55:55 UTC 2021


> De: "Mike Rettig" <mike.rettig at gmail.com>
> À: "Remi Forax" <forax at univ-mlv.fr>
> Cc: "Brian Goetz" <brian.goetz at oracle.com>, "mark reinhold"
> <mark.reinhold at oracle.com>, "jdk-dev" <jdk-dev at openjdk.java.net>
> Envoyé: Mardi 1 Juin 2021 22:48:26
> Objet: Re: JEP proposed to target JDK 17: 406: Pattern Matching for switch
> (Preview)

> On Tue, Jun 1, 2021 at 3:39 PM Remi Forax < [ mailto:forax at univ-mlv.fr |
> forax at univ-mlv.fr ] > wrote:

>> ----- Mail original -----

>> It's the difference between an API point like setAccessible for jigsaw and a
>> language construct, the statement switch,
>> language constructs are forever not APIs.

>> Rémi

> The API point setAccessible is still forever. It just requires some options to
> enable it. The same can be done with switch or any other language construct
> that is deemed legacy.

setAccessible can be deprecated, so it's not forever, the hope is that the use of setAccessible will decay, and java.lang.invoke.Lookup will be used instead. 

> Mike

Rémi 


More information about the jdk-dev mailing list