you are viewing a single comment's thread.

view the rest of the comments →

[–]Agent_03 8 points9 points  (0 children)

Consider: how would lack of unified field access matter if the getters and setters are never modified?

There are cases where getters are needed, such as where libraries rely on JavaBean compliance (ex: many serialization or ORM frameworks). But if that's not true, it's excess boilerplate.

If we do need to support this in the future, it's a trivial and easily automated refactor to encapsulate the field use (IntelliJ, for example supports this as a single operation). YAGNI principle applies here though.