News for hackers. Stuff that matters.
Re:Java record pattern matching in JDK 19 by halfmatthalfcat on Saturday May 14, 2022 @02:11PM (#31380689)
As does Scala:

  match thing {
    case a: String => 
      // use a as string
    case a @ MyCaseClass(b: String, c, d) =>
      // use a as the instance of MyCaseClass or use b as a string
  }

There are no comments on this comment yet.