[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-core-libs-dev
Subject:    Re: Pattern matching refactoring proposal
From:       Alan Bateman <Alan.Bateman () oracle ! com>
Date:       2024-03-29 1:45:29
Message-ID: 3a7220b2-a58b-4374-a633-89fb3f8dc0f0 () oracle ! com
[Download RAW message or body]



On 29/03/2024 05:43, science2000 wrote:
> Hello Core Libs Dev team,
>
> I would like to propose a patch [1] that applies pattern matching for 
> 'instanceof' (JEP-394) and 'switch-case' (JEP-433) on java.base. I 
> suppose this enchantment will improve readability and reduce the code 
> redundancy in cases of casts after 'inctanceof' checking.
> For better reviewing this improvement can be split into 4 tasks 1 for 
> each package: java [2], javax [3], sun [4] and com.sun.crypto [5].
>
> Please share your thoughts on whether such an improvement might be 
> applied.

 From a quick scan, you'll probably be asked to rename a lot of the 
variables as they very inconsistent with the naming in the changed 
source file, otherwise they should be safe and I assume you'll run at 
least tier1+tier2 at least.

-Alan
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic