Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/17/84; site hplabsc.UUCP Path: utzoo!utcs!lsuc!pesnta!hplabsc!kempf From: kempf@hplabsc.UUCP (Jim Kempf) Newsgroups: net.lang,net.lang.c Subject: Is C++ Object Oriented? Message-ID: <26@hplabsc.UUCP> Date: Tue, 7-Jan-86 13:03:01 EST Article-I.D.: hplabsc.26 Posted: Tue Jan 7 13:03:01 1986 Date-Received: Thu, 9-Jan-86 06:13:24 EST Distribution: net Organization: Hewlett Packard Labs, Palo Alto CA Lines: 23 Xref: utcs net.lang:1995 net.lang.c:7414 The phrase "object oriented" has been used to describe C++. While the semantics of defining "object oriented" can get tricky, I wonder if this term should be used to describe C++. A crucial difference which I see between C++ and more unambiguously object oriented languages, like Objective C, Smalltalk, and Lisp Flavors, is that the unit of encapsulation in C++ is the *class* rather than the individual member of that class. Member functions can access the "instance variables" (or private parts, as they are called in C++) of any member of the class. This has important implications for encapsulation and data security. In general, I find this aspect of C++ places it into the category of "abstract type"/"module" languages, like Modula-2 and CLU rather than "object-oriented" languages, like Smalltalk and Lisp Flavors. While there are pros and cons to both approaches, there is probably something to be said for making the distinction clear. For example, no one would call Lisp an "Algol-like" language, nor C a "symbolic processing language", even though it's possible to do Algol-like things in Lisp (Common Lisp even has a notion of block structuring) and symbolic processing in C. Jim Kempf kempf@hplabs