Patterns, `switch`, and Valhalla's Primitive Classes - JDK News #2
Channel: nipafx
Date: 2021-03-06

Project Amber brings new patterns and puts them into `switch` while Project Valhalla takes off and proposes introducing primitive classes - script: https://nipafx.dev/jdk-news-2/​

Table of contents:

0:00​​ Intro
0:48 Pattern Matching for `switch`
3:17 Array Patterns
3:27 Record Patterns
4:44 Primitive Type Patterns
5:44 Primitive Objects
10:26 Unifying Basic Primitives with Objects
12:04 Outro

Links

    # Intro

    JDK mailing lists: https://mail.openjdk.java.net/mailman/listinfo

    Project Amber: https://openjdk.java.net/projects/amber/
    Project Valhalla: https://openjdk.java.net/projects/valhalla/

    # Pattern Matching for `switch`

    JEP Draft: Pattern Matching for switch (Preview): https://openjdk.java.net/jeps/8213076
    Definitive Guide To Switch Expressions: https://nipafx.dev/java-13-switch-expressions/
    Type Pattern Matching with `instanceof`: https://nipafx.dev/java-type-pattern-matching/
    Java Feature Spotlight: Sealed Classes: https://www.infoq.com/articles/java-sealed-classes/
    Discussion on guard patterns: https://mail.openjdk.java.net/pipermail/amber-dev/2021-January/006929.html
    Discussion on consistency in type patterns: https://mail.openjdk.java.net/pipermail/amber-dev/2021-January/006930.html

    # Array Patterns

    Draft JEP on Record & Array Patterns: https://openjdk.java.net/jeps/8260244
    JDK News #1 - Pattern Matching Quartet: https://nipafx.dev/jdk-news-1/

    # Record Patterns

    Draft JEP on record and array patterns: https://openjdk.java.net/jeps/8260244

    # Primitive Type Patterns

    Primitive type patterns and conversions: https://mail.openjdk.java.net/pipermail/amber-spec-experts/2021-March/002836.html
    Method patterns: https://github.com/openjdk/amber-docs/blob/master/site/design-notes/pattern-match-object-model.md#method-patterns

    # Primitive Objects

    Draft JEP on primitive objects: https://openjdk.java.net/jeps/8251554
    Primitive values and void: https://mail.openjdk.java.net/pipermail/valhalla-dev/2021-February/008588.html

    # Unifying Basic Primitives with Objects

    Draft JEP on unifying basic primitives with objects: https://openjdk.java.net/jeps/8259731

Nicolai

    Website: https://nipafx.dev​
    Twitter: https://twitter.com/nipafx​
    Twitch: https://www.twitch.tv/nipafx​