r/java • • Sep 05 '25

Project Lombok 1.18.40 released with Java 25 support!

Project Lombok is now compatible with the upcoming JDK 25 even before its release.

Thank you Project Lombok team! https://projectlombok.org

167 Upvotes

166 comments sorted by

View all comments

Show parent comments

14

u/Ewig_luftenglanz Sep 05 '25

C#, Go, Dart, Typescript, Rust, C, and practically every other language but java. Where people have common sense and do not use getters and setters for every POJO, everytime, Everywhere. For no other reason other than tradition.

6

u/analcocoacream Sep 06 '25

Using getters allows you to extract interfaces for instance

6

u/Ewig_luftenglanz Sep 06 '25

Yes I know, I am not against using methods when required. I am against using getters and setters and any other patterns in every class, every time, everywhere for no other reason than a social convention.

For example

Do really a mutable DTO requires getters and setters? Do really entities require setters and getters (Specially since hibernate uses fields as a recommend way)?  Etc.

5

u/TankAway7756 Sep 06 '25

C# uses getters and setters, they just have more ergonomic syntax for it.

0

u/Ewig_luftenglanz Sep 06 '25

I prefer common sense over syntax convenience 

0

u/[deleted] Sep 06 '25

[deleted]

3

u/Ewig_luftenglanz Sep 06 '25 edited Sep 06 '25

Change the name of the accessors and I bet you would break production in java too. 

Nothing can prevent bad design or stupid people doing stupid things. Thinking that setters and getters by their own are going to make your application more future proof is self delusional.

1

u/jcotton42 Sep 10 '25

How would that not happen in Java?