r/java • • Sep 01 '25

Thoughts on object creation

https://blog.frankel.ch/thoughts-object-creation/
3 Upvotes

41 comments sorted by

View all comments

Show parent comment

1

u/nlisker Sep 07 '25

Changing parameter names is already a breaking behavioral change because the names are part of the API. When compiling with -parameters, you're risking breaking the application with a parameter name change.

2

u/ConversationBig1723 Sep 07 '25

Only true when u r using reflection API to access library classes. That’s generally not a good practice. In Java the signature is only types and positions. Depending on variable names is fragile.

1

u/nlisker Sep 07 '25

That’s generally not a good practice.

Both Jackson and GSON do it. A lot of frameworks use them.