JEP proposed to target JDK 17: 406: Pattern Matching for switch (Preview)
    Florian Weimer 
    fw at deneb.enyo.de
       
    Mon May 24 13:04:31 UTC 2021
    
    
  
* mark reinhold:
> The following JEP is proposed to target JDK 17:
>
>   406: Pattern Matching for switch (Preview)
>        https://openjdk.java.net/jeps/406
>
>   Summary: Enhance the Java programming language with pattern matching
>   for switch expressions and statements, along with extensions to the
>   language of patterns.  Extending pattern matching to switch allows
>   an expression to be tested against a number of patterns, each with a
>   specific action, so that complex data-oriented queries can be expressed
>   concisely and safely.
I think the formatter(Object) and formatterPatternSwitch(Object)
example implementations should be aligned ("unknown" vs o.String()).
    
    
More information about the jdk-dev
mailing list