| OO seems to be the proverbial elephant: everyone touches a different aspect of it, and comes away with a different understanding. Unlike the blog author, I'm not sure the most important part of it is data hiding. Alan Kay said in 2003: "OOP to me means only messaging, local retention and protection and hiding of state-process, and extreme late binding of all things." In terms of the last part of that definition (the late binding aspect), I saw Kay give a demo where he described a framework wherein any method can act on any object. I.e., he rejected the C++ style idea that a method is bound to a specific class, and can only act on that class. This is an idea from Smalltalk, and you can also do it easily in Lisp. BTW, if this seems unnatural, think about the Visitor pattern, which allows you to do exactly this, within the framework of C++ style class definitions. |