Path: utzoo!mnetor!uunet!lll-winken!lll-tis!ames!ll-xn!mit-eddie!bloom-beacon!gatech!purdue!i.cc.purdue.edu!j.cc.purdue.edu!pur-ee!uiucdcs!uiucdcsp!johnson From: johnson@uiucdcsp.cs.uiuc.edu Newsgroups: comp.lang.c++ Subject: Re: Critique of Wiener/Pinson Message-ID: <77300008@uiucdcsp> Date: 13 Apr 88 14:59:00 GMT References: <8063@apple.Apple.Com> Lines: 42 Nf-ID: #R:apple.Apple.Com:8063:uiucdcsp:77300008:000:2458 Nf-From: uiucdcsp.cs.uiuc.edu!johnson Apr 13 08:59:00 1988 I think it is unfair to criticise Wiener and Pinson because they didn't follow Wegman's terminology. First, they wrote their book before he wrote his paper. Second, Wegman's classification is not at ALL considered standard. It may become standard, but it isn't yet. I disagree 100% with the notion that object-oriented programming and data-abstraction are orthogonal. Actually, object-oriented programming is data-abstraction carried to extremes. Data-abstraction means that the programmer does not know how the "object" is implemented. O-o programming means that even the compiler does not know how the object is implemented! In other words, when the compiler "sends a message" (calls a virtual function) it doesn't know exactly which procedure is being called, but must depend on some kind of run-time binding. While I agree that inheritance is important, I think that message sending is more important. Thus, Emerald is object-oriented even though it doesn't have inheritance. Message sending can be used to fake inheritance with delegation. Of course, I prefer inheritance. Object-oriented languages most definitely do not have to allow direct access to their structure. In fact, I think that they should not. Smalltalk does not allow direct access to the instance variables of objects, except through instVar:at:, which is a kludge used for debugging. We never make C++ member variables public, but instead access them through member functions declared to be in-line. This means that we can easily reimplement the data structures in the class. So, I am disagreeing with the notion that the object-oriented world thinks that you should be able to directly access the fields of an object. Maybe your part of the world does, but mine does not, and mine is pretty big, too! I certainly agree that Ada and Modula-2 are not object-oriented but do support ADTs. The reason that they are not object-oriented is primarily because they do not support message passing (the Ada rendezvous doesn't count) and secondarily because they do not support inheritance. I am primarily a Smalltalk programmer, and am involved with several large Smalltalk projects, but I am also involved with the CHOICES operating system here at Illinois, which is an object-oriented o.s. written in C++. I use both languages in teaching. I probably think more like a Smalltalk programmer than like a C++ programmer, so that might explain my point of view. Ralph Johnson