Re: Pattern matching refactoring proposal

2024-03-28 Thread Alan Bateman
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 cas

Pattern matching refactoring proposal

2024-03-28 Thread science2000
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