News for hackers. Stuff that matters.
Re:A Healthy Hatred of OOP, or the principles of my message-... by ThrustVectoring on Tuesday April 12, 2016 @03:35PM (#11482840)
Getters and setters are an anti-pattern that works around a specific deficit in a programming language. In Python, if you want to refactor an object so that `foo.bar = baz` does something other than blindly set foo's bar to baz, you can. In Java, you can't, which is why setting foo's bar to baz is done with `foo.setBar(baz)`.

There are no comments on this comment yet.