Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!mcsun!hafro!isgate!krafla!snorri From: snorri@rhi.hi.is (Snorri Agnarsson) Newsgroups: comp.object Subject: Re: Evaluating "Object-Oriented" Programming Languages Message-ID: <1443@krafla.rhi.hi.is> Date: 4 Jan 90 12:21:45 GMT References: <638@ajpo.sei.cmu.edu> Organization: University of Iceland Lines: 69 From article <638@ajpo.sei.cmu.edu>, by eberard@ajpo.sei.cmu.edu (Edward Berard): > ... > - Static Versus Dynamic Binding: Binding is the association of > allowable operands (i.e., objects) with operations. Binding > may be either static (or early), i.e., accomplished at > compile time, or dynamic (or late), i.e., accomplished at > run-time. Until the introduction of Objective-C ([Cox, > 1986]), there was little, if any, discussion of "binding" > within the object-oriented community. I agree that binding is an important issue in evaluating OO programming languages; in fact I suggest that a programming language should not be considered object oriented unless it has dynamic binding of methods to messages, the binding being on a per-object basis. All the programming languages I would consider object orientet have this feature, including for example Smalltalk, Eiffel, Turbo Pascal 5.5 and C++. Offhand, I think dynamic binding is more important than inheritance. Inheritance is more easily simulated by "buying". If Ada had dynamic binding I would agree to call it an object oriented programming language, but if it had inheritance and no dynamic binging, I be very reluctant to do so. > > Static binding is usually associated with strongly typed > programming languages, and dynamic binding with weakly-typed > programming languages. Smalltalk and Objective-C support > dynamic binding. Some object oriented programming languages have both dynamic binding and object orientation, for example C++, Turbo Pascal 5.5 and Eiffel. I have not used Eiffel, but what I have seen about it suggests it has a much better typing scheme than other object oriented programming languages I know of. > ...[more features defining oo-languages] I would like to add a feature to the list which I believe has great effect on the way it can be used: - Automatic memory deallocation: Smalltalk and Eiffel are examples of OO-programming languages having this feature. It is much easier to do encapsulation in a language having this feature since we do not have to spend as much effort on describing memory management issues in the use of the encapsulated thing (in most cases we can entirely ignore the issue). Taking the memory management burden from the shoulders of the programmer and placing it on the run-time system is a prerequisite for elegant programming-in-the-large, in my opinion. C++ has a more restricted form of automatic deallocation, where the object is deallocated as it goes out of scope. This is more work for the programmer, who has to supply destructor methods for deallocation. Also, this can lead to more memory use, since sharing memory in different structures is hindered. > > This is probably the biggest article I have submitted to comp.object. > I'll try to cut back on the size of future articles. Thank you for > listening. > > -- Ed Berard Please don't cut back on my account, at least. And thanks for all the thought-provoking articles. -- Snorri Agnarsson -- Snorri Agnarsson | Internet: snorri@rhi.hi.is Taeknigardur, Dunhaga 5 | UUCP: ..!mcvax!hafro!rhi!snorri IS-107 Reykjavik, ICELAND