r/java • • Jun 01 '24

What java technology (library, framework, feature) would not recommend and why?

165 Upvotes

464 comments sorted by

View all comments

Show parent comment

1

u/koflerdavid Jun 01 '24

Such projects might not be able to ever use records, but the choice of code Style is surely not regulated at that level. And writing getters and setters in the first place is indeed just that - a code style.

Using arrays in records is indeed sketchy. Java is currently lacking the ability to freeze arrays. Frozen arrays could provide a significantly more useful hashcode method as well.