Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83 v7 ucbtopaz-1.8; site ucbtopaz.CC.Berkeley.ARPA Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!decvax!ucbvax!ucbtopaz!mwm From: mwm@ucbtopaz.CC.Berkeley.ARPA Newsgroups: net.lang.st80 Subject: Re: Definition of Buzzwords: "Object-Oriented" Message-ID: <689@ucbtopaz.CC.Berkeley.ARPA> Date: Wed, 30-Jan-85 01:26:53 EST Article-I.D.: ucbtopaz.689 Posted: Wed Jan 30 01:26:53 1985 Date-Received: Sun, 3-Feb-85 11:02:09 EST References: <4288@ucbvax.ARPA> <366@cavell.UUCP> <769@loral.UUCP> Reply-To: mwm@ucbtopaz.UUCP (Praiser of Bob) Distribution: net Organization: Univ. of Calif., Berkeley CA USA Lines: 60 Summary: Since we're into definitions, let me present my favorite version. This is from (I think - everything is stacked away in boxes) Tim Rench's SNot paper already mentioned here. Examples are not meant to reflect any real language. 'Data Encapsulation' - Provides modules, and data objects that only functions in the appropriate module can touch. For instance: MODULE IntStack is Push, Pop ; STRUCT Stack is ... ; PROCEDURE Push is ... ; PROCEDURE Pop is ... ; END IntStack ; x is IntStack ; y is Int ; x.Push(10) ; y := x.Pop() ; 'Data Abstraction' - An improved form of encapsulation, wherein the abstraction can be reused on different data types. For instance: MODULE Stack(T is TYPE) is Push, Pop ; ... ; END Stack ; MODULE List(T is TYPE) is ... ; END List ; x is Stack(Int) ; y is Stack(List) ; z is Int ; w is List ; x.Push(10) ; y.Push([a, b, c]) ; w := y.Pop() ; z := x.Pop() ; Finally, a programming language is 'Object Oriented' if *everything* must be encapsulated. In other words, Concurrent Euclid is 'Object Oriented,' and provides encapsulation, but not abstraction. Smalltalk is 'Object Oriented,' and provides abstraction. CLU is not 'Object Oriented,' but does provide abstraction. I prefer this definition because it gives a high degree of resolution when you want to talk about a language (admittedly, it takes a lot of buzz words). This would be far better than allowing 'Data Encapsulation' to disappear and 'Data Abstraction' and 'Object Oriented' to become synonyms. I think it even correctly captures the methodology split the smalltalk people like to talk about. If everything is in a module, then all data has a set of routines (messages) that can be used on it, and all routines have a set of data they are associated with. This should make thinking about things as data objects that reply to messages easier. Of course, whether the methodology gets used depends on the programmer.