scala / scala3

The Scala 3 compiler, also known as Dotty.
https://dotty.epfl.ch
Apache License 2.0
5.89k stars 1.06k forks source link

Scala Pattern Matching on Java Records (JEP-440) #20561

Open SethTisue opened 5 months ago

SethTisue commented 5 months ago

Discussed in https://github.com/scala/scala3/discussions/18115

Originally posted by **utenma** July 2, 2023 Java 21 added a very basic [pattern matching for Java records](https://openjdk.org/jeps/440), following @smarter's [feedback](https://discord.com/channels/632150470000902164/632628489719382036/1108445810233974836) there is chance Scala can take advantage of them. ![image](https://github.com/lampepfl/dotty/assets/19735362/3fc831fe-f9fc-4959-aa2c-8527fbf202f5)
SethTisue commented 5 months ago

I agree that this should be fairly high priority. Good Java interop has always been one of the engines driving Scala's success, so we shouldn't let that slide, or not too far or for too long, anyway.

@Gedochao can you tag and/or milestone this appropriately?