<story><title>Records Come to Java</title><url>https://blogs.oracle.com/javamagazine/records-come-to-java</url></story><parent_chain></parent_chain><comment><author>djsumdog</author><text>Java finally gets what&amp;#x27;s been available in Scala (case classes), C# (structs or maybe properties), Kotlin (data classes) and others for a very long time .. so long we already have tools like Immutables and Lombok to get past this really dumb limitation in Java.&lt;p&gt;I was really surprised to learn that the Java compiler&amp;#x2F;VM, when it sees the patterns &amp;quot;somevar&amp;quot; and functions &amp;quot;getSomeVar&amp;quot; and &amp;quot;setSomeVar&amp;quot; doing purely getter&amp;#x2F;setter stuff, removes the actual function calls and silently changes them in the background to field lookups for speed.&lt;p&gt;If you attach a debugger or memory profiler, is changes them back to functions and slows them down. I&amp;#x27;m not sure if this is still true; saw an example of this at a meetup back in the Java 8 days.</text></comment>
<story><title>Records Come to Java</title><url>https://blogs.oracle.com/javamagazine/records-come-to-java</url></story><parent_chain></parent_chain><comment><author>bozoUser</author><text>This is akin to case classes of Scala such a welcoming change to the Java world.&lt;p&gt;Apart from being a functional language one of main draws to Scala is the ease with  which one can get rid of the boilerplate code. So kudos to the Java team!</text></comment>