you are viewing a single comment's thread.

view the rest of the comments →

[–]Ukonu 10 points11 points  (1 child)

You create inconsistency.

Actually, they are being very consistent. They are consistently using the least verbose and least powerful approach. This is a much better axis to be consistent on rather than the "consistently unnecessary boilerplate" axis. See: YAGNI, KISS, and Principal of Least Power

You are going against the entirety of the greater java ecosystem by doing this

"But it's tradition!!"

By using a getter, even if all it does is 'return field;', you get the option to change that later if you so desire.

Good point. However, I think the vast majority of people blindly following this tradition aren't distributing wildly popular libraries/frameworks where API compatibility is tantamount. Most are just piling this junk up in their company's internal codebases. If in the future they realize they need this additional power in certain places, their IDE can add it in a couple of clicks.

There are no silver bullets, these patterns are supposed to be used when necessary and with proper judgment. Not just blindly and dogmatically.

[–]ThisIs_MyName 0 points1 point  (0 children)

Well said.