ExpressiveJava: Rewriting simple Scala interpreter – JDK17 code nearly identical

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

Our great sponsors
  • InfluxDB - Power Real-Time Data Analytics at Scale
  • WorkOS - The modern identity platform for B2B SaaS
  • SaaSHub - Software Alternatives and Reviews
  • expressive-java

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

  • I wanted to share this little project I found. The author has been writing Java re-implementations of the same Scala interpreter over the years as newer JDK versions & features are released.

    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:

    https://github.com/Randgalt/expressive-java/blob/master/java...

    Unfortunately, the Scala org website is down right now, so the original code can be viewed here for the moment:

    https://web.archive.org/web/20200103022853/https://www.scala...

    (Or also in the repo: https://github.com/Randgalt/expressive-java/blob/master/scal...)

    The final feature that is needed to really seal the deal, is part of JEP 405 for destructuring + binding to values in patterns ("Deconstruction patterns"):

    https://github.com/Randgalt/expressive-java/issues/3

    https://openjdk.java.net/jeps/405

  • InfluxDB

    Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.

    InfluxDB logo
NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts