Our great sponsors
-
expressive-java
Example of matching Scala's case class expressiveness in Java 8, Java 15 and Java 17
-
WorkOS
The modern identity platform for B2B SaaS. The APIs are flexible and easy-to-use, supporting authentication, user identity, and complex enterprise features like SSO and SCIM provisioning.
-
Immutables
Annotation processor to create immutable objects and builders. Feels like Guava's immutable collections but for regular value objects. JSON, Jackson, Gson, JAX-RS integrations included
With JDK17 and the introduction of Record types, sealed classes/interfaces, and pattern-matching the implementation can come close to ver-batim mirroring the Scala 2 one: - Scala: https://www.scala-lang.org/old/node/56.html - JDK 17 Java: https://github.com/Randgalt/expressive-java/blob/master/java-17/src/main/java/examples/SimpleInterpreter.java
That's good, but I prefer this : https://github.com/immutables/immutables It has all sorts of neat stuff like lazy, defered, cached, defaults etc. Just needs updating to use records.