News for hackers. Stuff that matters.
Re:A Square Is Not A Rectangle by jhancock on Monday September 14, 2009 @04:25PM (#822539)
your correct. And this is why the example is not good. Your saying someone might not expect the "side effect" of width changing when height changes. But this is a semantic setup. People do know how a Square is supposed to behave. One of the characteristics of a "first class object" is that there is common agreement on behavior. If we don't have this shared agreement, lots of things about OO design fall apart.

There are no comments on this comment yet.