Java
The Sin of Set
Why setters quietly violate object-oriented design Setters break one of the pillars of object-oriented programming: encapsulation. It does not matter whether they come in the pedestrian JavaBean form: public void setX(int x) or in the more elegant (but equally flawed) C# disguise: public int X { set; } Syntactic differences aside,