News for hackers. Stuff that matters.
Re:Java record pattern matching in JDK 19 by vips7L on Saturday May 14, 2022 @08:21PM (#31384059)
I personally feel that tuples are an antipattern. It’s relatively simple to just define a record with the properties you need and gives meaningful context information because the record and it’s properties are named.
Re:Java record pattern matching in JDK 19 by grishka on Saturday May 14, 2022 @09:45PM (#31384522)
Records are very new. To be honest, I haven't seen a single project that isn't my own use modern Java features. Most projects I've seen still target Java 8, some Java 11.
Re:Java record pattern matching in JDK 19 by vips7L on Sunday May 15, 2022 @11:25AM (#31388123)
It’s still just as easy to define a class with 2 fields. It takes 1 minute to write.