Hacker GitHub

← All repos

Randgalt/expressive-java

View on GitHub ↗ ★ 14 Java

Example of matching Scala's case class expressiveness in Java 8, Java 15 and Java 17

3 mentions on Hacker News by 1 person: 1 story, 2 comments · first 2021-11-05 · latest 2021-12-12

Mentions per year 3 mentions · busiest year 2021 (3)
20082026
  1. …and pattern-matching the implementation can come close to ver-batim mirroring the Scala 2 one: https://github.com/Randgalt/expressive-java/blob/master/java... > NOTE: Pattern-matching for switch is in second preview for JDK17, so not all…
  2. …(sealed types) with pattern match "switch" and the net result is an almost verbatim translation. https://github.com/Randgalt/expressive-java/issues/1 There is one ugly line which JDK18 will fix, "destructuring in pattern captures/match".…
    comment by gavinray · 2021-11-05 · in Why Co–Star Uses Haskell