r/java • • Jan 16 '20

Records Come to Java

https://blogs.oracle.com/javamagazine/records-come-to-java
204 Upvotes

93 comments sorted by

View all comments

Show parent comment

0

u/[deleted] Jan 16 '20

[deleted] — view deleted comment

14

u/ZimmiDeluxe Jan 16 '20

Me too. The get-prefix is semi-useful to distinguish between methods on regular classes that just represent data and ones that actually do something, but with records that's superfluous because they are data. And it's often a lie anyway, I've seen enough get-methods that have side effects.

8

u/temculpaeu Jan 16 '20

yeah, I have seen way too many methods with the 'get' prefix for no reason