antonis
01/17/2020, 7:54 AMaltavir
01/17/2020, 8:10 AMtseisel
01/17/2020, 8:27 AMdata class
and Java records have the same goal, but differ on the implementation :
- Records share a base class java.lang.Record
- toString
, hashCode
... have a JVM intrinsic with invokeDynamic
, resulting in smaller and more efficient bytecode (data classes may benefit from that in the future)
- Data classes are fully generated at compile time and are platform-agnosticantonis
01/17/2020, 8:50 AMEduardo Pinto
01/17/2020, 11:07 AMMike
01/17/2020, 11:48 AMaltavir
01/17/2020, 11:49 AMnkiesel
01/17/2020, 10:52 PMval
(i.e. no setters)natpryce
01/18/2020, 9:19 AM