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
20082026
-
…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…
comment by gavinray · 2021-12-12 · in ExpressiveJava: Rewriting simple Scala interpreter – JDK17 code nearly identical -
▲ 4
ExpressiveJava: Rewriting simple Scala interpreter – JDK17 code nearly identicalstory by gavinray · 2021-12-12 · 1 comment
-
…(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