Tuesday, February 28, 2006
Encapsulation Isn't Data Hiding
C. Keith Ray has a nice short post on what "encapsulation" really is.
I still run into far too many programmers who think that "encapsulation" just means making the data members private and writing a pair of get/set functions for each one. When I ask them what's good about that practice, they usually answer that they don't know, but that's what makes their code object-oriented. <sigh>