From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.3 required=5.0 tests=BAYES_00,INVALID_MSGID, MSGID_RANDY autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,8b8748382fcfacc1 X-Google-Attributes: gid103376,public From: Robert Dewar Subject: Re: friend classes in ada95 Date: 2000/04/20 Message-ID: <8dmjsq$vm9$1@nnrp1.deja.com>#1/1 X-Deja-AN: 613509085 References: <8dh37m$qef$2@wanadoo.fr> <3B5L4.1317$B43.116109@news.pacbell.net> <38FD1830.949F5E81@mindspring.com> <38FD1C9E.7C2B7756@research.canon.com.au> <8dldqi$mb7$1@nnrp1.deja.com> <38FE365D.31C893A6@acm.org> X-Http-Proxy: 1.0 x28.deja.com:80 (Squid/1.1.22) for client 205.232.38.14 Organization: Deja.com - Before you buy. X-Article-Creation-Date: Thu Apr 20 09:50:20 2000 GMT X-MyDeja-Info: XMYDJUIDrobert_dewar Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.61 [en] (OS/2; I) Date: 2000-04-20T00:00:00+00:00 List-Id: In article , Ray Blaak wrote: > OO programming being essentially about ADTs covers the most > important and worthwhile point. What makes OO programming > different from ADTs, in least in my opinion, is language > support for inheritance and polymorphism. nope! that has nothing to do with object oriented programming. inheritance and polymorphism are concepts that perfectly well fit into the general world of ADT's. Example. Suppose we define an abstract algebra as a tagged type. The operations are purely value oriented (e.g. operation + on two elements computes a third element). The notion of extending the abstract algebra to a concrete field makes perfect sense, and the notion of dynamic dispatching to allow routines to deal with different algebras also makes sense. What does not make sense is to think of this as object oriented programming, since the two fundamental components of objects: 1. state, so that objects can be changed 2. methods with message passing semantics so that the operations are viewed as passing a message to the distinguished object (the prefix in languages that use this syntax) are completely missing. When Simula-67 was introduced, ADT's were of course very well known and understood (this was after all a decade after Algol-60 was introduced!) Simula-67 had something original and interesting to add to the programmer's knowledge base. If you think that OO is simply about ADT's then you are back in the 60's and have missed something :-) On the other hand, if you think that type extension, information hiding, and dynamic dispatching are ONLY about object oriented programming, then you have also missed something! Sent via Deja.com http://www.deja.com/ Before you buy.