Path: utzoo!utgpu!jarvis.csri.toronto.edu!clyde.concordia.ca!uunet!snorkelwacker!apple!apple.com!susser From: susser@apple.com (Joshua Susser) Newsgroups: comp.object Subject: Re: Evaluating "Object-Oriented" Progra Message-ID: <6081@internal.Apple.COM> Date: 9 Jan 90 17:34:36 GMT Sender: usenet@Apple.COM Organization: Apple Computer, Inc. (ATG) Lines: 34 References:<638@ajpo.sei.cmu.edu> <135300019@p.cs.uiuc.edu> In article <135300019@p.cs.uiuc.edu> johnson@p.cs.uiuc.edu writes: > In my opinion, the three major characteristics of an OOP language are > > 1. data abstraction > 2. inheritance > 3. polymorphism caused by late-binding of procedure calls > ... > Snorri Agnarsson said some good things about automatic memory management, > all of which I support. It might be possible to think that he implied that > memory management is a feature of object-oriented programming. Someone > famous in the Smalltalk community (Dan Ingalls?) said this. However, I > don't agree at all. Automatic garbage collection is wonderful, and it > is especially useful in writing reusable code, but it is orthoganal to > OOP. Not quite. Characteristic 1) (which I generally refer to as encapsulation) implies garbage collection in a rather straightforward manner. Since an object encapsulates its state, once you give it a reference to another object, say as an argument to a message, you have no way of knowing whether that reference is maintained or not. From then on you can never externally know if it is okay to free the referenced (second) object. And if that object is ever referenced by more than one object, you have to be able to look inside all possible referents to know if the object can be reclaimed. The general case of this is called garbage collection. Joshua Susser Apple Computer ,Inc. Object Percussionist Advanced Technology Group arpa: susser@apple.com 20525 Mariani Ave. MS 76-2D uucp: {backbone}!apple!susser Cupertino, CA 95014 ALink: susser.j 408/974-6997 "I beat on objects."